What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Grouping several radio button fields but allowing only one selection

    Asked by wavejted on September 12, 2014 at 12:01 PM

    I have a form to sign up for ONE class but there are 3 locations, each with several choices.  The applicant should only select one class from all of the choices, but by creating 3 fields of radio buttons, they could potentially choose 3 classes.  Is there a way to restrict that, or else make it all one field with all the classes but independently label the columns with the location names?

    Thank you.

    Page URL:
    http://wavejted.org/enrollment_form.html

    Screenshot
    Selection grouping radio buttons label choices select
  • Profile Image
    JotForm Support

    Answered by david on September 12, 2014 at 02:12 PM

    Hi,

    You could use conditions to only show each location based on another drop down.  Create a new drop down menu with the names of your locations, and then only show the location that is selected:

    http://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic

    Set up one for each location and your users will only be able to select from one.  Here is my test form I set up as an example:

    http://form.jotformpro.com/form/42545455341958?

    Let us know if this does not work for you and we will be happy to see what else we can do.

  • Profile Image

    Answered by wavejted on September 12, 2014 at 03:17 PM

    Thanks, this looks like a good option.  I have two concerns with it, however:  I would like the applicants to be able to see all the options at once, as they may decide on a different location based on available classes; also, if they make a selection in one location & then choose one in another but can't/don't deselect the first one, we'll still get more than one result (I think I've seen the issue of deselecting a radio button choice in the forums before but don't remember if there was a solution to that).  Any further ideas?  Thanks.

  • Profile Image
    JotForm Support

    Answered by david on September 12, 2014 at 05:10 PM

    You could do something like this with check boxes:

    http://form.jotformpro.com/form/42545455341958?

    Then only allow for one selection.  This way all the selection will be shown if none are selected, but once one of them is, the user will not have access to the other two.  Deselecting the option once again shows all of the fields.

  • Profile Image

    Answered by wavejted on September 13, 2014 at 06:10 PM

    Thank you so much for your suggestions.  I'm gaining a lot of understanding of JotForm this way.

    I think I may have the solution:  by putting all the classes in one big radio-button field and then in my code just adding the location names where I want them.  Before all this, I didn't realize I could tweak it in the code without messing up the script (I'm using Dreamweaver).

    Thanks!

  • Profile Image
    JotForm Support

    Answered by ashwin_d on September 14, 2014 at 03:21 AM

    Hello wavejted,

    I am glad to know that you figured it out yourself.

    Yes it is possible to download your form's source code and change the code as per your need. The only draw back of using the form's source code is that every time you make any changes to your form in your form editor, you will have to download your form's source code again, add the custom code and then embed it again in your web page.

    Thank you!