How to add condition to default dropdown selection to empty?

  • smcbean
    Asked on August 1, 2017 at 5:55 AM

    I have 2 dropdown fields in my form. If an option is chosen in both dropdowns, then the first field is alterd to change answer, the show/hide conditions the ones after the 2nd dropdown change too.

     

    Is it possible for the 2nd dropdown to default back to 'empty' if the first dropdown answer is changed?

  • Ashwin JotForm Support
    Replied on August 1, 2017 at 7:27 AM

    Hello smcbean,

    Yes it is possible to achieve your requirement by adding condition to insert value in dropdown field. Please check the screenshot below how to add insert condition:

    How to add condition to default dropdown selection to empty? Image 1 Screenshot 20

     

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Sharon
    Replied on August 1, 2017 at 9:39 AM

    Thanks for this, but the solution didn't work. My problem isn't with clearing the fields, it's when the fields are changed (after the first input), the conditional fields (with the different dates of each course) g a bit crazy. Ie. they all appear when only one set should appear after the second dropdown menu option is selected.

    I've attached a video to illustrate the issue. Hope it's clear. Dropdown screen1.mp4

  • David JotForm Support Manager
    Replied on August 1, 2017 at 1:13 PM

    I have cloned your form, and the conditions you have created need to be recalibrated. I will be glad to guide you how to set them up correctly:

    1) When you create a condition to show a field if a specific selection is made, you do not need to create another condition to hide it if the opposite happens. So, please delete these condition:

    How to add condition to default dropdown selection to empty? Image 1 Screenshot 130 

    How to add condition to default dropdown selection to empty? Image 2 Screenshot 141

    2) Condition 7, 9 and 11:

    How to add condition to default dropdown selection to empty? Image 3 Screenshot 152

    How to add condition to default dropdown selection to empty? Image 4 Screenshot 163

    Should be combined into one single condition like this:

    How to add condition to default dropdown selection to empty? Image 5 Screenshot 174

    And condition 7 should be just this:

    How to add condition to default dropdown selection to empty? Image 6 Screenshot 185

    3) These two conditions that required the "Please confirm training location" field if any of the only 3 options of the "What is your query regarding" field is selected:

    How to add condition to default dropdown selection to empty? Image 7 Screenshot 196

    Can be combined into one condition like this:

    How to add condition to default dropdown selection to empty? Image 8 Screenshot 207

    Actually, you do not even need to apply a "required if" condition, simply set the field as required by default, and delete the conditions you have created to require it, example:

    How to add condition to default dropdown selection to empty? Image 9 Screenshot 218

    4) Delete any condition that you have disabled already.

    5) These 3 conditions need to be recalibrated, from this:

    How to add condition to default dropdown selection to empty? Image 10 Screenshot 229

    To this:

    How to add condition to default dropdown selection to empty? Image 11 Screenshot 2310

    The logic is the following:

    If question "Please confirm traingin location" is equal to Houstong, or Glasgow, then show field 15

    If question "Please confirm traingin location" is filled, then show fields 11, 17, and 18

    If question "Please confirm traingin location" is equal to Willingtong, then show field 14 and 16

    If question "Please confirm traingin location" is equal to Glasgow, then show field 13

    If question "Please confirm traingin location" is equal to Houstong, then show field 12

    6) Finally, go to your forms settings, and set the "Clear hidden fields values" option to "clear on being hidden", example:

    How to add condition to default dropdown selection to empty? Image 12 Screenshot 2411

     

    Please test my clone version here: https://form.jotformpro.com/72124387880966, and clone it if you want to: https://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Let us know if you need more help.

  • smcbean
    Replied on August 2, 2017 at 5:34 AM

    Brilliant, thank you so much. I had tied myself in knots with this and your solution works perfectly. Much more succinct. Thanks for all your help.

  • Ashwin JotForm Support
    Replied on August 2, 2017 at 7:22 AM

    Hello smcbean,

    On behalf of my colleague, you are welcome. I am glad to know that my colleague's solution works as expected. 

    Do get back to us if you have any questions.

    Thank you!