Conditional logic: how to set up a display of questions based on answers

Forms in Altcraft Platform can be configured so that some fields are visible only if the user gives a certain answer to a previous question. This mechanism comes in handy when, for example, you want to get more information why a person answers a certain way.

Let's suppose we're running a survey to rate the quality of a product. The form has a box with a scale from 1 to 10. If the person gives a low score, we need to find out what exactly went wrong. To do this, we will add another field - long text. However, this element is hidden. The user will only see it if he gives a score lower than 5.

Additional fields can be displayed after the elements:

  • Short text

  • Number

  • Yes/No

  • One choice

  • Multiple choice

  • Drop-down list

  • Date

  • Range

Sequence of actions

  1. When creating the form, click the Constructor tab. Add a Range element. Specify a title, which is the text that the user will see above the field. If you want, set the default value and select the range type:

Field 1

  1. Set the condition for the item by clicking the Add a condition button. It was agreed that the next field appears if the selected value is less than 5.

The condition

  1. Right after the field with the condition, on the same page, add a new element. In this case, it is Long text. Set the title and activate the Hidden form element option.

Field 2

Now if the user selects a certain answer choice, he sees a hidden element and can fill it in. Otherwise, the user proceeds to the next question. Conditional forms

Now you know how to show a user a hidden field in a form if he gives a certain answer to a previous question. In the next article, we'll tell you how to display the certain form pages depending on a specific answer.

You may be interested