Fields that are initially hidden, still appear in form.

  • Profile Image
    Asked on February 27, 2021 at 05:54 AM

    I have multiple questions in my form where if someone chooses one of the options, a follow-up question will appear. For example, there is the question, "Do you smoke?". A 'no' response to this does not trigger anything. A 'yes' response triggers a follow-up question about how often the user smokes. If the user changes their response back to 'no', the follow-up question disappears.

    I chose to render this by initially making the follow-up questions hidden fields and then adding conditional logic to show the relevant follow-up question if the user chooses a specific response to the initial question. This solution works as intended. However, there is a bug where if the initial question is empty (no response) when the user first opens up the form, the fields that are meant to be hidden, appear. Once the user picks their response, the mechanism returns to working as intended, but that original display of all the follow-up questions is bad for user experience.

    My first idea to tackle this was to create an additional condition, where if the question is empty, then all the follow-up questions are hidden. This condition however overrides the fact that the fields are initially hidden, and therefore completely disrupts my mechanism.

    One solution to this problem is to prefill the question. However, due to the nature of the questionnaire, I am not allowed to do so.

    I am assuming that this issue is being caused by some bug related to the hidden field option that I am applying to my follow-up questions. If so, would it be possible to fix that bug? If not, could I have help understanding what is causing this behavior in my form?

  • Profile Image
    Answered on February 27, 2021 at 08:55 AM

    A field that you would like to show conditionally doesn't need to be hidden on the form from its properties.

    For Example, here's the condition that I only need to show a field based on another field's answer.


    Here's a test form:

    On that form, the second field, Show if "Yes", is not hidden by default from its properties.


    I have checked further and it could be that the issue you are having is caused by a conflict between conditions in your form. For Example, in this condition on your form,


    #130, #131, and #132 fields will show if the "Yes" option is selected on the "Do you smoke?" field.

    However, there is another condition in your form that will only show one of the fields if the selected option in a field is "Birth Control Request".


    And there is another condition that will only hide the fields if "Sexual Health" is selected from another field.


    We will be glad to help you set up the conditions in your form to prevent such conflict. However, we may need for you to give us a detailed explanation of the workflow of your form and how you would like the conditions in your form to work.