Show field condition stopped working

  • Profile Image
    tbawa
    Asked on August 26, 2016 at 09:10 AM

    Hi, I am reviving a form we used last year successfully and I can't get the conditions which show/hide map fields working again. I am certain they worked fine last year. Can you have a look at the form please and let me know what I am doing wrong.

     

    Thanks

  • Profile Image
    Jim_R
    Answered on August 26, 2016 at 10:14 AM

    Hello, this happened because of 2 things:

    1. The first condition you have set will trigger regardless of what was selected for the Clinic field

    This means that whether the user picks something or nothing, then all maps will still be hidden

    2. Your show conditions for the maps only apply to show the actual selected radio button. Since the first condition to hide them prior to showing isn't working, then all the succeeding conditions failed to work too.

    To fix this, you just need to modify the first condition (from IF EMPTY and IF FIELD to just IF EMPTY) This will take care of initializing all your maps to be hidden if nothing was selected yet.

    Then, you'd have to show the maps based on the selected Clinic, then hide the rest like so:

    Here's a working clone of your form https://form.jotform.com/62384152919966

    Feel free to clone it too (here's how) so you can see how I setup the conditions :)

    In case you'd need further help, don't hesitate to ask.

  • Profile Image
    tbawa
    Answered on August 26, 2016 at 10:22 AM

    Thank you very much for your explanation and the sample form. I tried to avoid this tedious repetition because I thought the conditions are executed in order. So the first condition always hide all maps and the next conditions show the relevant map. Or in programming language terms the conditions are just a sequence of 'if' statements executed sequential. But apparently that is not how it works.

  • Profile Image
    Rose
    Answered on August 26, 2016 at 11:02 AM

    Glad to hear that this way solved your concern.

    You are right about repetition but it is also necessary at the same time to make your form workable.

    Please note that we would be pleased to assist you anytime if you need our support.