Grouping several radio button fields but allowing only one selection

  • Profile Image
    wavejted
    Asked on September 12, 2014 at 12:01 PM

    I have an enrollment 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.

  • Profile Image
    david
    Answered 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
    wavejted
    Answered 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
    david
    Answered 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
    wavejted
    Answered 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
    ashwin_d
    Answered 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!