Support Home Questionnaire Builder 2 Tutorials Tutorial: Conditional Logic

Tutorial: Conditional Logic

Overview

You can now show or hide questions and stimuli on the basis of a participant's previous answers! This tutorial will show you how. In this video below, our questionnaire is set up with four questions but we don't want to show all of this content to every participant. If they answer 'Yes' to 'Do you play an instrument?' we only want to show them the questions that are relevant for musicians. If they answer 'No', we want to show them the questions about their interest in potentially learning an instrument.

The first step is to have all your questions and stimuli set-up on the page. The first question has two possible answers: Yes or No. The second question should only show if they answer Yes so, in the settings for 'What type of instruments do you play?', we need to turn the Conditional toggle on.

In the Conditional toggle, we have a few different settings we could use. We don't want this question to be visible in the Default State (i.e. when the page loads for the participant), so we can set that to Hide. We want to add Conditions next, so we can set that to show the question if the response to 'Do you play an instrument?' is equal to the value 'Yes'. And that's it! If you enter Debug mode, you can see the question is now hidden at the start, and appears if you select 'Yes'. If you select 'No', it stays hidden.

We can now apply the same logic to the third question and set it to be hidden at the start and to only show if the answer to the first question is 'No'. For the fourth and final question, we only need to make this conditional on the third question.

Open in Gorilla


Info

Looking for Questionnaire Builder 1?

You can find the corresponding information in the older Questionnaire Builder 1 documentation.