Conditional Logic

Learn how to create conditional logic in your new surveys.

Gayathri Rajendiran avatar
Written by Gayathri Rajendiran
Updated over a week ago


In the survey interface, you can create conditional questions that only show when a certain condition has been met. This is a branching within a survey question. You also have the option of using the question and page Skip Logic, if you are looking to create different routes within your survey.

Creating a conditional logic question is detailed with an example below.

NOTE - The Add Condition button appears in your survey questions only after you create a choice-based question like the radio button, dropdown, or checkbox. The conditional logic cannot be applied to any other question type.

In your survey, if you want to create a question like - Do you own a car? If YES, How did you pay for the car? And if NO, Do you rent a car?

The first question (Do you own a car?) is called the parent question and the other two questions are called the child questions, since they are shown only when a certain condition is met.

 To create this conditional set of questions, first create the parent question (Do you own a car?), as a regular survey question.

Once the question is saved, create another new question (How did you pay for the car?) again as a regular survey question and then click the Add Condition button.

This will display, the conditions under which this child question is to be shown, for selection.

Select the appropriate parent question and the condition in which the child question should be displayed. Remember to click Save. In this example, the "How did you pay for the car?" will be shown only when "Do you own a car?" is a "Yes".

Similarly, create the next child question (Do you rent a car?) by creating another new survey question and then click the Add Condition button.

This will display the conditions under which this child question is to be shown, for selection.

Select the appropriate parent question and the condition in which the child question should be displayed. Remember to click Save. In this example, the "Do you rent a car?" will be shown only when "Do you own a car?" is a "No". 

Once you have Saved the child question conditions, they appear below the parent question in your list of questions for the survey.

Illustrated below is a view of how a participant would see these questions on the front end. Parent question:

Illustration of when a "Yes" is selected:

Illustration of when a "No" is selected:

You can set as many conditional questions as you like and you can even set conditional questions based on other conditional questions. 

As with any survey you set up in EngagementHQ, make sure that you  Preview and test the logic of the survey, ensuring that questions appear in the right order, as required. 

Note:

  1. If you make a conditional question inactive it will be shown underneath its parent even with the Show inactive questions option disabled, so you don't lose track of it and can enable it later.

  2. If you de-activate a parent it will de-activate all child questions and upon re-activating a parent it will re-activate all child questions.

  3. If you are de-activating a child question because you no longer wish to use it, we recommend removing the condition from the question.

TIP: Please refer to this article about the reporting impacts of changing your survey/form after it is published.

Contact our support team if you need any further assistance via chat or email support@engagementhq.com

Did this answer your question?