User Guide

 

How to Show or Hide Fields Base on User's Answer

How to Show or Hide Fields Base on User's Answer

Show / Hide a form field is part of our Conditional Logic feature. This option is useful if you want a field to appear or hide, only when a previous field is filled or an option is selected.

Now, let's start with an example form. In the form builder, I have the following form structure:



As you could see, I have the field "How did you know us?". We will apply a conditional logic to this field that would show the individual text boxes below depending on the chosen option.


1. Simply click on Settings>>Conditions.

2. Then click on Show /Hide Field.

3. In the next window, just simply add your rule and action fields. 

For example, from the field in the demo form, we have:

Just simply repeat the same condition for the other options and fields. In the example form, the overall conditional logic would be like this:

Please see it for yourself here: http://www.jotformpro.com/form/51225421689961.

Note that you can add many rules and actions if you want. You can show/hide multiple fields at once. If you need to, just simply choose and follow our instructions from the following guides:

http://www.jotform.com/help/196-Hide-or-Show-Multiple-Fields-at-Once

http://www.jotform.com/help/297-Show-or-Hide-multiple-fields-at-once-using-form-collapse-tool


If you have any questions, please let us know in the comments box below or by simply posting a thread into our support forum

Send Comment

12 Comments...

  • jhghf'

    ghj'
    --What a validation!!!!!

  • LMG_Coffs

    Hello, I have done exactly as the above example explains, however, when I preview the form the fields that should only show based on the condition (based on what answer they select) are still showing, so it does not seem to be working for me. I'm unsure of what I'm doing wrong.

  • mlmajor

    Can I use the show/hide conditional on the submit/print/clear form buttons? I am trying to hide (through CSS) the first submit button, which has an associated Print button. Then, only after the Print button is clicked, will the second submit button appear.

  • gendersummit12

    Gracias, pude realizar el formulario sin problema,
    Saludos,

  • SACFS

    Is it possible to create a new iteration of the same dropdown if the first one is "used".
    ie. If I select an item from the list, can I then recreate the same dropdown list exactly underneath this one that gives the user the ability to select other things from that same list up to say 5 things.

  • r83rob

    When I use this a promo code hides the right fields but then when the email comes in all the hidden fields are there with the visible one

  • realtomsamsher

    can u make it so that if ur using a multiple choice option then it take the user to every page they checked when they press next and not the next page?

  • marklane

    I'm not sure if I've encountered a bug or have a fault with my logic rules at the moment. I'm currently having a problem in a form I've created (https://form.jotform.com/60384042233143) where:
    If you answer yes (that you have children), when you answer yes to has this child been baptized a section called "baptism info" should be displayed. If you answer anything other than yes the "baptism info" should not be displayed.

    My problem is that no matter what I answer the "baptism info" is not displayed.

    Please let me know if I'm doing something wrong. Thanks for your help.

  • DanielRavens1

    This works for me no problems on desktop but as soon as it is on mobile, when i try to show the hidden fields by choosing a selection on the drop down menu, nothing happens. Am i missing some file links if I'm using the source code integration method?
    Thanks

  • lynn25med

    I am using a likert scale from 1-10. Is it possible to set a conditional field, so that if they answer anywhere from 5-10 they are prompted to the next question and if they answer 4-1 they are not prompted to an additional ?

  • AKinmarketing

    Thanks.. It was helpful

  • Jo

    Can I hide an event once it reaches a certain number of submissions so no one else can respond?