Help Center

Question Display Logic

You can use display logic to create surveys that are customized to each respondent. When a specific question or answer choice pertains only to certain respondents, you can hide it conditionally, based on previous answers or metadata. Through display logic, you can create surveys that dynamically adapt to your respondents’ answers and custom fields.

CSL conditions

The display logic is set using CSL. A CSL condition is a statement that is either true or false.

Here is a simple example that will return true:

{{eq 1 1}}

Translation: The ‘eq’ stands for ‘equals’. In CSL, the operator is always placed first. The other two items are what is being compared so it says ‘1 is equal to 1’. This is true.

Here is an example that will return false:

{{eq 1 2}}

It says ‘1 is equal to 2’. This is false.

CSL conditions can be used in logical operators like ‘if’ statements and they can be used in question display logic.

For example, in question one, respondents are asked how many children they have. Later you have a checkboxes question asking about favorite things to do on the weekend. One of the answer choices is ‘Taking kids to the park‘. You would not want to show that answer choice for respondents that don’t have children. So you would set the display logic for that answer choice to be ‘Hide if‘ and use the following CSL condition:

{{eq respondent.questions.children_count 0}}

Translation: The ‘eq’ stands for ‘equals’. You could use other operators here too, like ‘gt’ (greater than). The variable in the middle refers to the children count question using its data label. So it says: Is the answer the respondent gave to the children count question equal to 0?


  1. Click on the dropdown next to the question.
  2. Click on Edit.
  3. Click on the Display Logic tab.
    Depending on the question type, you can set the logic for the entire question, sub-questions and answer choices.
  4. Look for the item you would like to conditionally hide and select Hide if.
  5. In the textbox that appears, enter or paste the CSL condition that you would like to use to determine if the item should be hidden.
    If the condition is true, then the item will not be shown to the respondent. If the condition is false or invalid, the item will be shown.
survey question answer choice display logic
Note! The source question must be on a previous page. The conditions are checked only once, when the page is loaded.


If you select Hide if in the dropdowns on the display logic tab, you can use these example conditions to get started. See our CSL page for more operators. See our CSL survey variables page for a list of variables that you can use.

Respondent selected answer choice 1 in the question with the data label ‘myLabel’.
Respondent selected answer choice 1 in the first sub-question.
{{not respondent.questions.myLabel.answerChoices.1}}
Respondent did NOT select answer choice 1. The NOT reverses the result. So if something is true, adding a not in front makes it false.
{{ge survey.questions.myLabel.answerChoices.3.results.respondentCount 20}}
20 or more respondents selected answer choice 3.
{{and respondent.questions.myLabel.answerChoices.1
     (eq respondent.customfields.1 'test')}}
Combine multiple conditions using and (All terms must be true).
{{or respondent.questions.myLabel.answerChoices.1
Combine multiple conditions using or (At least one of the terms must be true).
{{not (or respondent.questions.myLabel.answerChoices.1
When using a ‘not’, each term is evaluated to true or false and then finally reversed so that rule becomes false and false becomes true.

Looking at the last ‘not’ example above, let’s assume for example, the respondent answers choice 7. Simplified, the code can then be seen as:

{{not (or false true)}}

The or is true since the respondent answered one of the two answer choices, so you get:

{{not (true)}}

‘Not’ makes the true become false:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.