Conditional Logic
By default the questions are presented to the user in the order they are configured in and all possible answers are shown (unless they lead to an empty result).
In some cases you might want the quiz to behave differently.
For example, in a gift shop the first question could be Are you looking for a gift for an adult or a child?. If a user chooses adult you might want to follow up with a different question than if a user chooses child.
Or, you might ask a question What is the person interested in?. If, in the previous example question the user answered adult, you could show answers such as cooking or wellness. But if the user answered child, the possible answers could be games or sports.
To accomplish these types of scenarios, two types of rules can be applied: Follows (for the first scenario) and Depends (for the second one).
Follows is for questions and enables you to specify the following rules:
- Question X should follow question Y (instead of its default predecessor question)
- Question X should follow question Y only if answer A was chosen
Depends is for answers and enables you to specify the following kinde of rule:
- An answer to a question is only shown if the user chose certain answers to previous questions
Configuring "Follows" rules
To configure Follows rules, click into the Follows column in the Questions table. Here are two examples corresponding to the two scenarios above:
- In the following example, the hobby question will follow the age question, the interest question is skipped:
- Here the age question is asked, only if the answer child was chosen before:
Configuring Depends rules
To configure Depends rules, click into the Depends column in the Answers table. In the following example the answer cooking will only be shown if adult was chosen before: