How can I conditionally show/hide fields based on user's selection.

  • boladag
    Asked on January 4, 2017 at 1:19 PM

    I'd like make a conditional form, like this:

     

    Question 1

    Answer A ( )

    Answer B ( )

     

    Question 2

    Answer X ( )

    Answer Y ( )

     

    The conditional will be in Question 3! If the answer were A and Y:

    Question 3

    Answer A ( )

    Answer Y ( )

    or If the answer were B and Y:

    Question 3

    Answer B ( )

    Answer Y ( )

    or If the answer were A and X:

    Question 3

    Answer A ( )

    Answer X ( )

     

    got it?

  • Kevin Support Team Lead
    Replied on January 4, 2017 at 3:40 PM

    Yes, this will be possible using the show/hide condition, basically you will add the first two questions to your form and the set of three questions based on the posible answers in the two other questions. 

    On my end I have used the radio button since it avoids the user to select more than one option: 

    How can I conditionally show/hide fields based on users selection Screenshot 40

    If you notice I have added multiple times the question 3 based on the sample you gave: 

    The conditional will be in Question 3! If the answer were A and Y:

    Question 3

    Answer A ( )

    Answer Y ( )

    or If the answer were B and Y:

    Question 3

    Answer B ( )

    Answer Y ( )

    or If the answer were A and X:

    Question 3

    Answer A ( )

    Answer X ( )

    This is because you can only show or hide questions, but you cannot alter the options in it, at least not with radio buttons or check boxes, you can not add or delete options with conditions. 

    Now, the last step is only to set  up the conditions, they will need to be added as you explained above, and do not forget to change the condition to math all the rules to be triggered, otherwise with only one statement to be met the condition will be triggered. 

    Here's a screenshot of the conditions you will need to add to your form: 

    How can I conditionally show/hide fields based on users selection Screenshot 51

    How can I conditionally show/hide fields based on users selection Screenshot 62

    Here's the link to my sample form where you can see how it works: https://form.jotform.com/70036037443953 

    Feel free to clone it following this guide: How-to-Clone-an-Existing-Form-from-a-URL

    Also, here's a guide where you will find more info about how to show/hide fields based on other fields answers: How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    If you have any question, please let us know.