How to create a form that displays questions depending on the answers selected?

  • pisar1616
    Asked on 28 listopada 2023 09:30

    Dzień dobry,

    Potrzebuje wykonać formularz, który będzie zawierał pytania TAK lub NIE. Po każdej odpowiedzi w zależności jaka odpowiedź została zaznaczona wyświetlą się różne pytania. Na koniec w zależności od poprzednich wyborów klientowi wyświetli się jedna wiadomość oraz zostanie również przesłana na maila.

    Jak to zrobić najbardziej sprawnie? Bez tworzenia miliona warunków?

    Pozdrawiam,

  • Rayzel Jotform Support
    Replied on 28 listopada 2023 13:52

    Hi Bartek,

    Thanks for reaching out to Jotform Support. Unfortunately, our Polish Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Polish, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now, let me help you with your question. You can achieve this by using the Conditional Logic feature in Form Builder. I have made a sample form for this. Let me walk you through it:

    1. In Form Builder, click Add Form Element + menu on the left side of the page.

    2. I added the following elements to my sample form:

    • 1 Single Choice - "Do you like food?"
    • 4 hidden Multiple choice fields - (Meat, Pork, Beef, Chicken, and Fish Categories) - Hide these fields by default.
    • Hidden Paragraph element that will store the values in the text boxes with the message

    The form should look like this:

    How to create a form that displays questions depending on the answers selected? Image 1 Screenshot 110

    How to create a form that displays questions depending on the answers selected? Image 2 Screenshot 121

    4. Click on Settings in the orange navigation bar at the top of the page.

    5. Then, click Conditions on the left menu.

    6. Next, click Add a new condition, select Show/Hide Field, and set the following "IF" State conditions and save them.

    How to create a form that displays questions depending on the answers selected? Image 3 Screenshot 132

    You can Show/Hide a Field based on an answer. Here's an example:

    IF Do you eat meat?
    STATE Is Equal To
    VALUE Yes
    DO Show
    FIELD If yes, what kind of meat?

    How to create a form that displays questions depending on the answers selected? Image 4 Screenshot 143

    I create more conditions with different values. Here's the list:

    How to create a form that displays questions depending on the answers selected? Image 5 Screenshot 154

    7. To display the selected data in the paragraph field, you will have to take note of the Unique Name of the fields that store the values selected. Click on the field's gear icon to open the Properties panel on the right.

    8. Go to the Advanced tab.

    9. Expand the Field Details, view, and take note of the Unique Name.

    How to create a form that displays questions depending on the answers selected? Image 6 Screenshot 165

    11. Add your message in the Paragraph element and put in the Unique Name in curly braces to display the selected answers.

    How to create a form that displays questions depending on the answers selected? Image 7 Screenshot 176

    You can also select the form fields to add them.

    How to create a form that displays questions depending on the answers selected? Image 8 Screenshot 187

    12. Lastly, add a condition that will display the Paragraph element:

    How to create a form that displays questions depending on the answers selected? Image 9 Screenshot 198

    You can also add an Autoresponder Email to your form. You can modify the contents using the Form Fields and Unique Name of the Autoresponder email to display the answers that you want.

    Here's a preview of the sample form you can also check out and clone it:

    Conditions: Show questions of a survey based on answers Image 4 Screenshot 3 Screenshot 43 Screenshot 209 How to create a form that displays questions depending on the answers selected? Image 10 Screenshot 2110

    Give it a try and let us know if you have any other questions.