Add condition to show/hide multiple fields based on the click of another field?

  • aricurn
    Asked on September 12, 2017 at 6:57 AM

    I am trying to add in extra fields to the online form for a vet practice where the client adds in details about pet 2 and pet 3.

    I know that I have to click on the conditions icon for 'do you want to add a new pet', but I do this and try to add in new fields and then get totally confused and nothing works!

    The new fields I want to add into Pet 2 is -

    Pet Sex

    Previous Vet Practice:

    We will use this to retrieve essential history about your pet and in Pet 3, I just want to add

    Pet sex:

    I have added in these fields as shown in the screenshot image, but do not know how to make them visible?

    Many thanks for all your help with this as it's giving me grey hairs!

    Jotform Thread 1245199 Screenshot
  • sabbirahmedchow
    Replied on September 12, 2017 at 8:18 AM

    You were actually doing it right. What you have to do is, select multiple fields for adding multiple pets. As you can see there is one drop down option for a single field selection. Likewise, you can choose multiple fields by clicking the blue + sign right next to the DO/FIELD option. By clicking this icon, you will be able to add multiple fields that are required to fill the additional pets information.

    Each time you have to click that + icon to add number of fields for each pet history. Once you are done, click Save and do the same again for Pet3, Pet4 and so on.

    Please let us know if you need any further assistance in this regard. 

  • aricurn
    Replied on September 12, 2017 at 3:49 PM

    Many thanks for your reply. The conditions fied is very confusing. I have added in the fields as you described but I have now messed up the choices button, so when the question is asked -do you want to add another pet, the fields are not hidden - not sure how to change that?

    Thank you

  • sabbirahmedchow
    Replied on September 12, 2017 at 4:15 PM

    I have cloned your form and tried to make the changes that you were looking for. Please check this

    https://form.jotform.me/72546021544451

    Let me know if this helps.

  • aricurn
    Replied on September 12, 2017 at 4:19 PM

    Following on from your last e-mail, the cloned form you have shown me is exactly what I am aafter - thank you! Are you able to change my form for me?

     

    Thanks again

  • sabbirahmedchow
    Replied on September 12, 2017 at 5:05 PM

    Refer to this image where I showed you how to do this for Pet2. You can add all the fields for Pet2 this way and save it. After that, you can do the same for Pet3.

     

    Add condition to show/hide multiple fields based on the click of another field? Image 1 Screenshot 20

     

    Just Keep in mind that you have two "Would you like to add another pet?" option. Number 22 is for Pet2  and Number 31 is for Pet3. Hope you understand.

    Let me know if you still have issue doing it.

  • John_Benson
    Replied on September 12, 2017 at 8:23 PM

    Hi aricurn,

    If you want to clone the form of the (sabbirahmedchow), please follow this guide: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    For more information about the Show or Hide conditions, please open this link: https://www.jotform.com/help/316-How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    Contact us again if you have a question or need assistance.

  • aricurn
    Replied on September 13, 2017 at 4:22 AM

    Many thanks for all your help with this. I would rather learn how to do it than just clone the form, so I have managed Pet 3 from your very good instructions  - thank you; but when I click on Would you like to add another pet for the first Pet 2 option, the conditional option does not appear; so not sure how to add it and how to proceed (as shown in image attached) Thank youAdd condition to show/hide multiple fields based on the click of another field? Image 1 Screenshot 20

  • sabbirahmedchow
    Replied on September 13, 2017 at 4:40 AM

    Glad that you made it for Pet3. What you have done for Pet2 is, you have selected the same "31. Would you like to add another pet?" option for both Pet2 and Pet3. Keep in mind, they are different controls so they have different IDs.

    Since you have selected "31. Would you like to add another pet?" already for Pet3, you can't select it for Pet2. You have the same control under the dropdown called "22. Would you like to add another pet?". You need to select this for Pet2. And under DO drop down selection, select "Show" instead of selecting "Show Multiple". Then one by one add Pet2 fields just like the way you did for Pet3.

    Sorry for this long elaboration. Let us know if you need further assistance. 

  • Ashwin JotForm Support
    Replied on September 13, 2017 at 5:04 AM

    Please note that there is a better way to organise you condition instead of trying to show/hide multiple questions. You need to add "Section Collapse" field and add one condition to show/hide multiple fields. The following guide should help you:  https://www.jotform.com/help/297-Show-or-Hide-Multiple-Fields-at-Once-Using-the-Section-Collapse-Field

    Here are the steps you need to follow:

    #1. Separate the each set of "Pet' related field by adding a set of starting and closing "Section Collapse" fields.

    #2. Add condition in form to check if the "Would you like to add another pet?" is selected, just show the respective "Section Collapse" field.

    Please check the screenshot below:

    Add condition to show/hide multiple fields based on the click of another field? Image 1 Screenshot 20

     

    Please take a look at the following cloned form and see if this works as expected:  https://form.jotformpro.com/72551953467970

    Feel free to clone this form for a closer look. The following guide should help you in form cloning: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    Hope this helps.

    Do get back to us if you have any questions.

  • aricurn
    Replied on September 13, 2017 at 5:15 AM

    I have it all sorted now - thank you for all your help with this - it was so prompt and helpful. Thanks again!

    Arielle