Conditional Logic

Use Conditional Logic to Show or Hide Certain Content Elements

Sara avatar
Written by Sara
Updated over a week ago

Available on

❌ Free

✅ Basic

✅ Pro

✅ Business

Conditional logic is a powerful feature that can help you customize your projects and tailor your content to meet specific use cases. By using conditional logic, you can show or hide certain elements based on the criteria that you have set. This allows you to personalize your projects and create a more engaging experience for your participants.

How to Enable It

To find the builder you just need to select the element you want to apply a conditional formula to, and then on the right side of the editor, scroll all the way down until you see the "Conditional Logic" section.

How Does Conditional Logic Work?

The basic premise of conditional logic is simple - you specify if you want the element to be shown or hidden and then set the conditions for that action to happen.

This means that you can create rules to show or hide content elements (questions, buttons, etc.) based on the participant's responses to previous questions. All of this can be done inside the Conditional Logic Builder.

When creating your rules, it's important to think about what you want to achieve and plan your conditions in advance, so as to make the process easier.

Conditional logic will be disabled by default, and here you can choose if you want the element you selected to be hidden or shown when certain conditions are met.

There's also the option "Always hide for participants" which can be useful if you for example want to hide a calculator so participants don't see the result, or if you have a page timer running in the background and don't wan't participants to know about it.

The Conditional Logic Builder Explained

The conditional logic builder allows you to pick between the "ALL" and "ANY" options, and also use a combination of conditions and inner groups to create more complex rules and customize your project further.

If you're familiar with conditional operators (like the ones used in our calculators):

  • ALL stands for "AND" - This means that all conditions below must be true.

  • ANY stands for "OR" - This means that at least one of the conditions must be true.

As for the inner groups that you can use, these function like the brackets in a calculator formula, except in this case we have conditions inside the brackets.

Inner groups are a great way to mix and match the ALL and ANY based on sub conditions - this means that you can have ALL at the root/higher level, and then one condition as the inner group, where ANY must be true.

Let's say that you want an element to show only if:

  • The score is greater than 50.

  • The answer to the first question contains either "apple" or "banana".

In such a scenario we would make use of inner groups like this:

Examples of Using Conditional Logic

"Other" Option

Let's say you have a survey where you want the participant to write down their question, if they pick the "Other" answer/option. This is where conditional logic comes in.

To achieve this result you can add a Short or Long Answer element and then set a condition like the following one to it:

What this condition does, is check if the answer the participant picks equals "other". If this condition is met, then the Short/Long Answer element will be shown, like so:

You can also easily add an "Other" option to any of your questions simply by clicking the option "Add other option". You can find this option by selecting the question element, then scrolling down on your right side.

Show or Hide Specific Questions Based on Previous Answer

You can also use conditional logic to show additional questions to participants who pick a specific answer for example, or hide those questions for participants who select some other answer instead.

In the below example, we set the Image Choice element to be shown when the "How old are you?" question is not empty (meaning an answer has been picked).

Then the NPS element is set to only show if participants pick the "Satisfied" answer, or higher. While the Short Answer element only shows if the participant picks the Somewhat satisfied" answer or any of the lower options.

The below screenshot shows the logic that was used on the Short Answer element, but the same applies to the NPS element too.

The final result will then be something like this:

Show Different Elements in the Thank You/Outcome Page Based on Score

Showing or hiding elements can be done on any page, including Thank You and outcome pages. If you want to show/hide different text or images based on the participant's score, then this can be easily achieved with conditional logic. You can even go one step further and change the styling of the elements based on the score.

In the example below, we made it so that the Score element's color matches the participant's final score.

We wanted to have 3 different possible colors, so in order to do that we added 3 Score elements to our Thank You page, and set each one to only be shown based on the participant's score. This way if the participant's score is 1/3 the score element with the red color will be displayed, while if they score 3/3 the score with the green color will be shown instead.

As for the button element, we set it to be hidden if the participant gets a perfect score.

If you still have any questions about this feature, please feel free to contact our support team.

Did this answer your question?