Display logic
About display logic
With display logic in QUESTIONSTAR you control whether specific questions or entire pages within the questionnaire are shown or hidden — depending on previous answers or other conditions. It lets you design the questionnaire dynamically and context-sensitively, so that each respondent sees only relevant content.
This way you avoid unnecessary questions, reduce the survey duration and at the same time increase data quality — because respondents stay more focused when they only have to answer questions that apply to them.
Typical scenarios:
- When someone selects "Other," an additional input field appears for a custom entry.
- Only those who previously give a negative rating see a follow-up question asking for the reason.
- A question block is shown only if the person belongs to a specific target group (e.g. role, industry or location).
- A page offers three topics to choose from — and only for the selected topics do more in-depth questions appear later on.
Display logic is especially helpful when, within a section, you want to show or hide questions selectively — without having to skip entire pages. It offers fine-grained control of the questionnaire and can be flexibly combined with other logic.
Setting up display logic
Display logic can be set up very easily right in the settings of a question or page. That's how you determine the conditions under which it should be visible to respondents.
Here's how to set up display logic:

- Open the question settings of the question that should only be shown under certain conditions. To do so, click the gear icon next to the question (in the questionnaire area) or in the navigation area.
- In the settings area on the right, switch to the "Extended Item Settings".
- Click "Add Display Logic". A purple area then appears below the question.
Define the condition under which the question should be shown:
Note:
The dropdown for selecting the controlling question only shows questions that are placed before the current question in the questionnaire. That's because, logically, display logic cannot depend on questions that are asked later in the questionnaire.In the example shown, the open-ended question Q2 "What can we do better?" is only shown if the rating in the previous question (Q1) was less than or equal to 3 — that is, when a rather critical rating was given.
- If you like, you can combine several conditions — using AND/OR links. This lets you model even complex display behavior.
And here's what it looks like:
Display logic for answer options
With display logic you can also control precisely which answer options of a question should be visible — depending on the answers given previously.
This is especially helpful when, for example, you only want to show relevant options within an extensive selection, or when certain options are only intended for certain user groups.
Example:
First we ask in the questionnaire how our tool is used
(e.g. private, business, etc.). In a later question, we want to ask about specific areas of application — but only show those that match the previous selection. If the respondent selects "private" in the first question, the business-relevant answer options should be hidden in the follow-up question.
And here's how:

First add display logic to the question.
To do so, follow steps 1 to 3 from the previous section "Setting up display logic".
When defining the condition
- Select the option "Hide".
By default, the entire question is offered for showing/hiding — but via the dropdown you can also control individual answer options selectively.
Tip:
For matrix questions you can also define display logic for individual rows and/or columns.- Now select an answer option that should be hidden.
- Using the plus icon (+) you can add more options to create a combined condition. The defined condition then applies to all selected options.
- Define the condition — in our example: "If the option 'Private' was selected in the usage question."
Try out this feature in our sample questionnaire on pages 2 and 3.
If you've already filled out the questionnaire, simply reload the page to fill it out again.
Display logic for pages
Display logic can be applied not only to individual questions but also to entire pages. This lets you show whole sections only when they are relevant for the respective target group.
Example:
In our sample questionnaire we ask at the outset whether the respondent is already a customer of QUESTIONSTAR. At the end of the survey we want to ask a classic NPS question: "How likely are you to recommend our tool?" Naturally, this question should only be shown to people who already have experience with the tool — that is, our existing customers.
If you've already filled out the questionnaire, simply reload the page to fill it out again.
And here's how:

- Open the Page Settings of the relevant page.
- Click "Add Display Logic".
- Define the condition under which the page should be shown — in our example: when question Q3 "Are you already a customer of QUESTIONSTAR?" was answered with "Yes."
What else can display logic be based on?
With display logic you can precisely control whether a specific question or page is shown — depending on previously captured information. And you're not limited to answers within the questionnaire: external or technical characteristics can also serve as the basis for conditions.
QUESTIONSTAR offers you a wide range of sources that display logic can draw on:

Possible sources for display conditions:
- Question answers: answers to previous questions in the questionnaire.
- Fields from the contact list: for example department, customer group or region.
- URL parameters: such as a campaign or participant code passed when the survey is opened.
- Device type: for example whether the survey is being filled out on a smartphone or desktop.
- Quota status: whether a specific quota has already been reached or is still open.
Additional sources (only shown if present in the survey):
- Custom variables: variables that you have calculated.
- Test results: the score or grade achieved from a test embedded in the survey.
- A/B test scenario: the version (A, B, C, etc.) assigned to the respondent.
- GPS coordinates: provided that collection is enabled in the survey settings and respondents have given their consent in the questionnaire.
This lets you flexibly adapt the display of your questions or pages to individual respondent characteristics or test results.
Typical mistakes when setting up compound display logic
When configuring complex display conditions — that is, when the visibility of a question or page depends on several preceding answers — mistakes often occur. A common reason is that the logical operators AND and OR are used differently in everyday language than in logical or programmatic thinking.
Example:
Imagine you ask in the questionnaire which age group the respondents belong to (e.g. "18–20 years", "21–25 years", etc.). Later you want to show a question or page only to people from the groups "18–20 years" and "21–25 years".
What seems sensible in language at first doesn't work logically:
A respondent can only ever select one age group (either "18–20 years", or "21–25 years", or another, but never two age groups together). An AND condition would therefore never be met — the question would never be shown.
Correct solution: Use an OR link:
"Show question if age group = "18–20 years" OR age group = "21–25 years" [is]"
Example:
You want to show a question if the person is either in the age group "18–20" or "21–25" and at the same time female.
Formulating a single condition like "18–20 OR 21–25 AND female" is problematic, because logically it means:
- The question is shown if someone is in the group "21–25" and female
- or if someone is in the group "18–20" (regardless of gender).
Better: Instead, use two separate conditions/display logic blocks:
- "Age group = 18–20 AND gender = female"
- "Age group = 21–25 AND gender = female"
To avoid mistakes with complex conditions:
- Keep the conditions as simple and clear as possible.
- Where possible, avoid nested logic with many AND/OR links.
- Break complex logic down into several simple individual conditions / independent display logic blocks.
- For each condition, think in clear logical rules — not in everyday language.
This way you make sure your questions are actually shown to the right target groups.