Two fields but only one can be selected.

  • webilac
    Asked on January 29, 2019 at 10:26 AM

    Hi. i have two fields in the section "Step Two (Choose one course for your selected time block)but i want the user to only be able to select one item.  

    so if they select an item from the 4:00 to 6:00 field then i don't want them to be able to select an item from the 6:30 to 8:30 field and vice versa.

    i can't hide either field because i need the user to be able to see both fields at the same time.  

     

    I can't find any logic that will help me do this.

    Jotform Thread 1716097 Screenshot
  • David JotForm Support Manager
    Replied on January 29, 2019 at 11:49 AM

    I have cloned your form and it seems like you figured it out, by asking the user to select one of the Time Blocks. However, to make sure that only one will be selected, they need to load disabled, so you need only these two conditions:

    1548780500conditions 001 Screenshot 10

    Here is my clone version: https://form.jotform.com/90284581095967?jumpToPage=5 

  • webilac
    Replied on January 29, 2019 at 12:41 PM

    thank you!  if they make a mistake after selecting one of the 4-6 courses and then go back to select a new 6-8 time block it seems as if the 4-6 course selection they chose is still lightly highlighted?

  • Donald_H
    Replied on January 29, 2019 at 2:41 PM

    Yes, if they go back and change the time block, the previous choice remains selected and the field gets disabled. I have run tests and can confirm that the two selected time blocks appear in the submissions view as well after a user submits the form.

    To fix this, you can add a Clear Form button at the end of the form alongside the submit button. This way, if the user makes an error they can clear the entire form and start over as follows;

    1. Select the submit button.

    2. click the properties icon (gear).

    3. proceed to the advanced tab and toggle the Reset Button on.

    1548790447Selection 272 Screenshot 10

    Alternatively, you can choose to have the field hidden and then set the value to clear hidden field values to either clear on submit or clear on being hidden.

    1. Go to SETTINGS > FORM SETTINGS > SHOW MORE OPTIONS.

    2. Scroll to the section Clear Hidden Field Values.

    3. Change the setting to suit your needs.

    Note that this requires you to show/hide the two time block options such that the fields are cleared on submit or cleared when hidden.

    1548790800Selection 273 Screenshot 21

    For further assistance on this, do let us know.