Display Logic
About Display Logic
You can use display logic to create a survey that is customized to each respondent. When a specific question or answer choice pertains only to certain respondents, you can set display logic on it so that it shows conditionally based on previous information. You can choose to conditionally display both questions and answer choices, allowing you to create a survey that dynamically adapts to your respondent’s answers. Display logic is found in the Question behavior section of the survey builder.
Setting Question Display Logic
This section walks through using display logic to conditionally display a question based on the respondent’s previous answers.
- Select the question that you want to display conditionally.
- Select Display logic.
- Set the condition that must be met for the question to display. The condition can be based on any of the following:
- Question: Display a question only if the respondent chose a specific answer to a previous question. This is the only option compatible with in page display logic (see below). See logic based on a question and a list of possible fields for question logic.
- Embedded Data: Use any information you have stored about the respondent to set display conditions. For example, only display a question to those who have an embedded data field for Age, equal to 25. See logic based on embedded data.
- Quota: Once a Quota has been created, set a condition based on whether or not the quota has been met. See logic based on a quota.
- Contact List: Base the condition on information already stored in a contact list field, such as first name, last name, or email. See a list of logic based on a contact list.
- GeoIP Location: Automatically use the IP address of the survey participant to estimate their location and set a condition based on country, city, postal code, etc. See logic based on GeoIP location and a list of possible fields for GeoIp location logic.
- Loop & Merge: After a loop and merge block has been created, set the conditions within the loop and merge based on the current loop. See logic based on loop and merge.
- Device Type: Base the condition on what type of mobile device is or is not being used, including Mobile (any mobile device), Blackberry, Android, iPad, iPhone, iPod, Opera Mobile, Palm, Windows Mobile, and Other Mobile (any mobile device that is not listed here).
- True – False: Create a condition that always evaluates to true (meaning the question will always display) or false (meaning the question will never display). This is particularly useful when building and testing your survey. See logic based on true – false.
- If desired, select the In Page checkbox if you want the question to appear immediately once the condition is met, rather than displaying it on the next page of the survey. For more information about this option, read the using in page display logic section.
- When finished creating your conditions, click Save.
Features incompatible with In Page Display Logic
Pretty much every question type can have in page display logic applied to it. However, when you’re creating the condition under which display logic is activated, in page functions are not always compatible.
Here’s a list of some of the features incompatible with in page display logic:
- Loop and merge
- Skip logic
- Multiple choice – dropdown list questions
- Text entry questions
- Pick, group, and rank questions
- Drill down questions
- Constant sum questions
- Side by side questions
- Rank order questions
- Heat map questions
- Hot spot questions
- Graphic slider questions
- Timing questions
- File upload questions
- Answer choice display logic
- Carry forward answer choices
Setting Answer Choice Display Logic
Answer choice display logic is used when you want to conditionally display certain answer choices in your survey.
Qtip: If you want to repeat a respondent’s selected answer choices across multiple questions, use carry forward instead. For example, let’s say you ask respondents to choose their favorite foods from a list. In the next question, you want them to rank their selected foods by preference. Instead of duplicating your question and adding display logic to every single answer choice, use carry forward to repeat the respondent’s selected choices in a new question.
- Click the arrow next to the answer choice you want to add display logic to.
- Choose Add Display Logic.
- Click Add logic.
- Set the condition that must be met for the answer choice to display. The condition can be based on any of the following:
- Question: Display a question only if the respondent chose a specific answer to a previous question. This is the only option compatible with in page display logic (see below). See logic based on a question and a list of possible fields for question logic.
- Embedded Data: Use any information you have stored about the respondent to set display conditions. For example, only display a question to those who have an embedded data field for Age, equal to 25. See logic based on embedded data.
- Quota: Once a Quota has been created, set a condition based on whether or not the quota has been met. See logic based on a quota.
- Contact List: Base the condition on information already stored in a contact list field, such as first name, last name, or email. See a list of logic based on a contact list.
- GeoIP Location: Automatically use the IP address of the survey participant to estimate their location and set a condition based on country, city, postal code, etc. See logic based on GeoIP location and a list of possible fields for GeoIp location logic.
- Loop & Merge: After a loop and merge block has been created, set the conditions within the loop and merge based on the current loop. See logic based on loop and merge.
- Device Type: Base the condition on what type of mobile device is or is not being used, including Mobile (any mobile device), Blackberry, Android, iPad, iPhone, iPod, Opera Mobile, Palm, Windows Mobile, and Other Mobile (any mobile device that is not listed here).
- True – False: Create a condition that always evaluates to true (meaning the question will always display) or false (meaning the question will never display). This is particularly useful when building and testing your survey. See logic based on true – false.
- If you’d like, you can expand any of the other sections to add display logic to other answer choices.
- Click Save when you’re finished.
Editing & Removing Display Logic
Question Display Logic
After applying display logic to a question, a blue bar will appear. You can edit the display logic by clicking on the dropdown menu on the right of the blue bar and selecting Edit. To remove the display logic, select Remove.
Answer Choice Display Logic
After applying display logic to the answer choices, an arrow will appear to the left of the answer choice. To edit display logic, click the dropdown menu to access the choice options list and select Edit Display Logic. To remove the display logic, select Remove Display Logic.
Hiding Questions with Display Logic
Have you ever decided that you wanted to remove a question or answer choice halfway through the study? You still want to be able to analyze the data, but you don’t want respondents to see it and respond to it anymore. You can accomplish this with display logic.
- Select the question you want to hide.
- Select Display Logic.
- Using the first dropdown menu, select True – False.
- Select False in the second dropdown menu.
- Click Save.
Qtip: You can hide answer choices as well! Use the same logic statement, but add it to an answer choice instead.
Since you’ve created a False logic statement, the question will never be displayed.
Using In Page Display Logic
If desired, select the In Page checkbox if you want the question to appear immediately once the condition is met, rather than displaying it on the next page of the survey.
Troubleshooting Display Logic
Below is a list of common errors and support resources to help you troubleshoot display logic.
Additional Resources
- Using logic: This support page is a general guide on how to use logic in Qualtrics. The following sections of the using logic page are particularly helpful:
- Creating conditions: This section walks through building a condition from scratch, breaking down each aspect of creating a condition.
- Adding multiple conditions: As your survey grows more complicated, your logic likely will too. You may need to add multiple conditions to your display logic to make sure the right respondents are shown the right questions. This subsection shows you how to set up these multiple conditions correctly with multiple examples to help guide you.
- Creating advanced logic with logic sets: Logic sets are sets of statements that are evaluated together. Logic sets allow you to say that if one group of statements is true AND/OR if another group of statements is true, then the condition is true. We recommend using logic sets as you start to add more conditions to your display logic since they make the logic easier to organize.
“Invalid Logic”
This error appears when the display logic you set up is no longer valid. Usually, this is because the question or answer choice the display logic is based on has been deleted. If the question has been deleted, you can restore it from your trash and the display logic will also be restored. If restoring the question does not fix the display logic, you will need to rebuild the display logic.
Additional Display Logic Issues
ExpertReview will flag any survey questions with invalid display logic. ExpertReview looks for issues with survey methodology, and can identify issues that you may easily miss. For example, ExpertReview will flag if you’ve created display logic based on a question the respondent hasn’t yet seen. The survey editor won’t flag this issue, but ExpertReview will.
Check out this support page for a comprehensive list of issues with examples, and suggestions of how to resolve them.
Display Logic in Different Project Types
This type of question behavior is available in many different types of projects. The options described on this page are available in:
There are a few other projects that have access to question behavior, but with unique functionality to keep in mind.
- For 360 projects, see Question Behavior (360).
- For Conjoint and MaxDiff, see this support page.