How to show fields conditionally?

  • rachelconnors
    Asked on May 25, 2018 at 4:07 AM

    Hi! I'm trying to build a somewhat complex form with a lot of conditional formatting to help customers submit all the correct information for a quick/useful customer service response. 


    For some reason, whenever I get past the 2nd "layer" of questions, I run into a roadblock. None of the conditional formatting for show/hide seems to work after that second question.

    Can anyone advise on what I'm doing wrong? 

    Jotform Thread 1482711 Screenshot
  • Victoria_K
    Replied on May 25, 2018 at 7:35 AM

    Hello,

    I can see that some of your conditional statements are broken at the moment, which means that they are not executed:

    1527248051screenshotib0ws Screenshot 10

    Can you please fix them and test your form again? 

    We will gladly assist if you would need further help.

    Thank you.

  • rachelconnors
    Replied on May 25, 2018 at 3:21 PM

    thanks! I fixed those broken conditions but that hasn't resolved the problem.

    I'll try to explain my question more clearly because I am not sure I did a good job last night.


    I am trying to build multiple layers of logic for a customer service "tree" i.e.

    On first landing, there is only one dropdown question visible. 

    If you select the "I'm an existing customer" field from the dropdown

    Then the Customer "Give us more details about your question" field would show up below

    Then if you select the "I need help tracking a package" field from the "more details" dropdown, the fields for "Help tracking a shipment" "have you received a shipping confirmation" etc. should show up.

    This is the point where I'm getting stuck. I've tried building that step with both "show multiple" fields and "hide multiple" fields. I've tried to create section collapses to streamline it. I've tried using two "if" conditions, i.e. If "I'm an existing customer" AND "I need help tracking a package" are selected. 

    Ideally, I would like to be able to add more conditional fields "layered" beyond that, but I think I have to get to the bottom of this before I can go any further.

    Would love any input! Thanks!


  • Adrian
    Replied on May 25, 2018 at 4:20 PM

    I have cloned your form and added the following condition. So, I am showing the whole section (Help Tracking: Step 1) if the answer to the question "Customer Give us more details about your question" is equal to "I need help tracking my package".

    How to show fields conditionally? Image 10

    Cloned Form URL: https://form.jotform.com/81445860310956

    Result:

    How to show fields conditionally? Image 21

    I also suggest you check the help guides below.

    How-to-Show-or-Hide-Fields-Base-on-User-s-Answer
    Show-or-Hide-Multiple-Fields-at-Once-Using-the-Section-Collapse-Field

    If you are still having issues, let us know which condition you think is not working properly.

  • rachelconnors
    Replied on May 25, 2018 at 5:40 PM

    Hmm I think I still haven't explained what I'm trying to do well. Here's an example of the problem I'm having: 


    1527284366conditional other question fie Screenshot 101527284402conditional other question Screenshot 21

  • rachelconnors
    Replied on May 25, 2018 at 5:43 PM

    Here's another example 1527284557conditional hanging hammock Screenshot 101527284576conditional hanging hammock fi Screenshot 21

  • rachelconnors
    Replied on May 25, 2018 at 5:44 PM

    I have many ways that someone can get to the "end" of the customer service tree and they all need to end with a submit button, etc. Anything that is set to "show" under multiple conditions isn't showing up... 

  • Victoria_K
    Replied on May 25, 2018 at 6:38 PM

    Hello,

    I was checking you form again. I can see that you have several conditional statements to control appearence of particular fields. For example, if your section ^UNFAQ SUBJECT LINE is controlled by several conditional statements, this field will only appear when the last conditional statement is met. 

    You could drag the conditional statements to meet to adjust the logic:

    1527287900screencast55 Screenshot 10


  • rachelconnors
    Replied on May 25, 2018 at 6:59 PM

    Hmmm so I think your point means I'd need to create a separate "subject line" field for each of the conditional statements?

    Because I want that "subject line" field to show in several different circumstances and there's not a single order of statements that would make it show up...

    I think that creates a quandary with the "Submit" button because I don't want the "Submit" button to show up until certain conditions are met? 

    I'm clearly in over my head but I think we're getting closer! Thanks so much for all the help!


  • Mike_G JotForm Support
    Replied on May 25, 2018 at 8:16 PM

    I'm not sure if you already know this, but you can set up multiple "IF" statements when setting up conditions. For example, "IF A is equal to 3 AND IF B is equal to 4, SHOW C". It can also be "IF A is filled  OR IF B is filled, SHOW D"

    We will be glad to further help you with your concern. 

    Can you tell us the different circumstances where the "Subject Line" field should show in your form, please?


    Also, can you explain in details what should be happening, what is not happening, and what is currently happening on your form in relation to the conditions you set up? If you can tell us what fields should show and should not show based on each field's state, that would be great.

  • rachelconnors
    Replied on May 29, 2018 at 8:54 PM

    Here is an examples of what the form should look be showing and what is happening instead... I am just trying to complete a decision tree that will help our customers submit a request with all the necessary information to resolve it... 

    Screen Recording of one set of conditionals: https://www.dropbox.com/s/joovpx500ew02y6/2018.5.29%20jotform-conditional.mov?dl=0

    Results of this setting: https://www.dropbox.com/s/05rjk1uxguka7gm/2018.5.29%20jotform-conditional.png?dl=0

    The thought of going backwards to create all the conditionals in the way you described is mind-boggling... It seems like it should be a little more straightforward to create a decision tree like this and I feel like there must be some simple thing I am doing wrong!


  • Vanessa_T
    Replied on May 29, 2018 at 10:52 PM

    Hello @rachelconnors,

    Upon checking your form, I was able to replicate the issue you've mentioned. I have cloned your form and will dig deeper on the conditions to find and debug the underlying issue of it. Will get back to you as soon as I have an update.

  • Vanessa_T
    Replied on May 30, 2018 at 12:25 AM

    I have fixed the issue on my cloned form: https://form.jotform.com/81488377815976

    Feel free to clone it back to your account if you like it.

    Upon further checking, there were conditions where the "Show Multiple" fields were incorrectly set. They were using the actual fields rather than the Section Collapse field which conflicts the section's visibility. Below is just one example of some conditions messing the Section's visibility.

    How to show fields conditionally? Image 10

    Also, you may want to take note that there is a duplicate condition for the question "Do you still have a question about tracking your shipment?" = "Nope, I'm good!", but no condition set if the value was "Yes, please help!". I have removed the duplicate on my cloned form. You may want to create another condition for the Yes part.

    Here's a preview of how it is working on my end.

    How to show fields conditionally? Image 21

  • rachelconnors
    Replied on May 30, 2018 at 9:43 PM

    Thank you so much! It is so much closer to working! I am still having a problem if I select "Yes please help" for several options! (See attached image). I 

    hate to be so helpless, but I can't figure out what is stopping these from working! 

    1527730983conditional yes help Screenshot 10

  • Mike_G JotForm Support
    Replied on May 31, 2018 at 12:12 AM

    Upon checking the conditions in your form, I see that you want the Submit button and the Captcha field to be shown on your form in 15 different instances.

    10. New Give us more details about your question is equal to I need help hanging my hammock

    10. New Give us more details about your question is equal to I need help choosing my hammock

    10. New Give us more details about your question is equal to I've got another type of question

    7. Customer Give us more details about your question is equal to I've got another type of question

    7. Customer Give us more details about your question is equal to My hammock is defective/damaged

    4. Tell us about you! is equal to I've got another type of question

    22. Radio Edit (id152) is equal to No, I haven't received that e-mail

    39. Do you still have a question about your return is equal to Yes, please help!

    39. Do you still have a question about your return is equal to Nope, I'm good!

    43. Do you still have a question about your exchange is equal to Yes, please help!

    43. Do you still have a question about your exchange is equal to Nope, I'm good!

    33. Do you still have a question about hanging your hammock is equal to Yes, please help!

    33. Do you still have a question about hanging your hammock is equal to Nope, I'm good!

    26. Do you still have a question about tracking your shipping is equal to Yes, please help!

    26. Do you still have a question about tracking your shipping is equal to Nope, I'm good!

    Those instances are also separated into different conditions. And that's where the conflict is.

    E.g.: On one condition, the 26. Do you still have a question about tracking your shipping field will show the Submit Button and the Captcha field if it is equal to Yes, please help!. But, on another condition, it states that the Submit button and Captcha field will only be shown if the 26. Do you still have a question about tracking your shipping field is equal to Nope, I'm good!.

    To fix the issue, I suggest that you have all 15 instances (IF Rules) in one condition and remove the action to show the Submit Button and Captcha field on the other 15 conditions.

    1527739580t23 58 08 Screenshot 10

    Remember to set the condition to IF ANY OF THe "IF" RULES ARE MATCHED.

    I hope this helps. If you have other questions or concerns, please do not hesitate to let us know.

  • Vanessa_T
    Replied on May 31, 2018 at 9:29 AM

    @rachelconnors,

    Please see my note above your last comment, there is NO condition set for "Yes please help". Please add a new condition where if "Do you still have a question about tracking your shipment?" = "Yes please help", then show some fields.

    How to show fields conditionally? Image 10