Conditional Logic Setup for Show/Hide Multiple Fields Based on User Selection

  • arnoldmatt700
    Asked on May 18, 2024 at 8:30 AM

    Hi everyone,

    I'm building a pretty complex form with Jotform and I'm stuck on a conditional logic hurdle. I'm trying to set up a scenario where the user only sees specific follow-up questions based on their selections earlier in the form.

    For example, if they choose "Option A" in question 1, I want questions 4 and 5 to appear. But if they choose "Option B", I want questions 6 and 7 to be displayed instead.

    I've been playing around with the "Show/Hide Fields" logic, but I can't seem to get it to work quite right. Any advice or pointers would be greatly appreciated!

  • Norwyn JotForm Support
    Replied on May 18, 2024 at 8:46 AM

    Hello Matt,

    Thanks for reaching out to Jotform Support. Can you share the URL link to the form so we can check this for you? Let me walk you through how to locate it:

    1. Click on the Publish tab in the orange navigation bar located at the top of the Form Builder page..
    2. On the Link to Share section, click on the Copy Link button to copy the URL link to the clipboard.

    Conditional Logic Setup for Show/Hide Multiple Fields Based on User Selection Image 1 Screenshot 20

    Once we hear back from you, we'll be able to move forward with a solution.

  • arnoldmatt700
    Replied on July 5, 2024 at 3:53 AM

    Hi Norwyn,

    Thanks for reaching out! Sharing the form might be tricky at this stage (it's for a project called "Nile Gold Kitchen Handles").

    Would it be possible to offer some general advice on setting up "Show/Hide Fields" for multiple choice answers like the ones I described?

    Thanks!

  • Martin_A JotForm Support
    Replied on July 5, 2024 at 4:20 AM

    Hi Matt,

    I'd be happy to offer some general advice on setting up the Show/Hide Fields feature for multiple choice answers.

    To achieve the scenario you described, you can use the Show/Hide Multiple option in the condition rule. You will need to ensure that all the questions (4, 5, 6, and 7) are hidden by default. This is crucial for the conditional logic to work correctly.

    Next, you can set up the conditions for each option. For example, if the user selects "Option A" in the Single Choice element, use the Show/Hide Multiple option to conditionally show "Question 4" and "Question 5". Similarly, if the user selects "Option B", use the Show/Hide Multiple option to conditionally show "Question 6" and "Question 7". Let me help you set that up:

    1. In Form Builder, click on Setting in the navigation bar at the top.
    2. Select Conditions from the left side of the page.
    3. Click on +Add Condition button, and select Show/Hide Field.
    4. Create the conditions for each option as presented in the screenshot below:

    Conditional Logic Setup for Show/Hide Multiple Fields Based on User Selection Image 1 Screenshot 30By following these steps, you should be able to achieve the desired behavior where the user only sees specific follow-up questions based on their earlier selections. I've created an example form that you can clone and examine using this link. Here are the results:

    Conditional Logic Setup for Show/Hide Multiple Fields Based on User Selection Image 2 Screenshot 41

    We also have a guide about Conditional Logic for Online Forms that you can check out.

    Give it a try and let us know if you need any help.

  • arnoldmatt700
    Replied on August 10, 2024 at 10:02 AM

    This is a good breakdown. To make it even simpler, could you create a step-by-step guide with screenshots? And for a personal touch, consider adding some holiday cheer with images of Christmas gift baskets Canada.

  • Ibrar JotForm Support
    Replied on August 10, 2024 at 10:43 AM

    Hi Matt,

    As mentioned by my colleague, we can only provide you some general guidance how to configure conditions. I have reviewed your account and haven't found any form in that. If you create a form, try to set the conditions and if you face any issue while achieving your expected result, you can share form URL with us and expected result with us, and we'll help you to figure it out.

    Once we have a better idea of what’s going on, we’ll be able to come up with a solution.