Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
use button on form without submit

I created a form in which I need to use these two tags. My problem is that every time the user clicks on it, the form is submitted. I used onclick="return false" as follows, but the values ​​are not sent in the url Query.

                <div class="btn-group d-flex justify-content-center col-11 mx-auto" role="group">
                <button type="radio"  onclick="return false" name="type" value="rent" class="btn btn-lg btn-light pr-4 pl-4" id="left">YES</button>                       
                <button type="radio"  onclick="return false" name="type" value="sale" class="btn btn-lg btn-light pr-4 pl-4" id="right">NO</button>
            </div>
            <div class="col-11 mx-auto">
                <button class="btn btn-block btn-danger">Submite</button>
            </div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

<button type="radio"

Radio buttons are input elements, not button elements. They are also empty/void elements which can't have children, so use a label element instead.

<input type="radio" name="type" value="rent" class="btn btn-lg btn-light pr-4 pl-4" id="left">
<label for "left">Yes</label>

Note that screen reader software tends to read out content in all-caps letter-by-letter. Write in normal sentence case and use the CSS text-transform property to present it in upper-case instead.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!