Before you start using Logic Jumps (PRO feature), here are a couple suggestions:
- Plan the logic path for your typeform first
- Read some helpful tips on this feature:
Adding Logic Jumps to your questions
Once your Logic path is mapped out, it’s time to move to the construction phase!
You’ll want to add the Logic and the conditions (If-statements) to certain questions inside your form. You can do this one-by-one, by adding conditions to the question before the branching begins. Here are some simple steps to follow:
- Open your typeform in your Workspace. You’ll be in the Build panel.
- Hover the cursor over the first question where you want to add Logic Jump. Do not click to edit the question. Some icons appear on the right
- Click on the green arrow that appears to the right.
- Click on the green button to add a Logic Jump.
Next step? Adding conditions to your questions.
Different conditions based on different question types
Each of the following field types allow different types of conditions (“If” statements) to be used in the Logic Jumps:
- Closed-ended questions
- Open-ended questions
- Date field
- Numerical fields and Score variable
- Hidden Field variable
1. Add Logic Jumps to close-ended questions
In case of closed-ended questions (Multiple choice, Picture choice, Yes/No question) you have the following two options:
- is not
This allows you to ask different follow-up questions based on the answer choice your respondent selected:
How to set Logic Jumps in order to make this work?
To learn the rules for how to add multiple conditions to one question, please scroll down to the last section of this article.
2. Add Logic Jumps to open-ended questions
With open-ended questions (short text, email) you have the following options:
- is equal to
- is not equal to
- begins with
- ends with
- does not contain
Here you can set up Logic Jumps based on whether a certain word or character is typed into the open-text question field:
- is equal to: the Logic Jump will work only if the input of the field is exactly the same as defined in the condition
- is not equal to: the Logic Jump will work only if the input of the field is not the same as defined in the condition
- begins with: the Logic Jump will work only if the input of the field begins exactly the same as defined in the condition
- ends with: the Logic Jump will work only if the input of the field ends exactly the same as defined in the condition
- contains: the Logic Jump will work only if the input of the field contains what is defined in the condition
- does not contain: the Logic Jump will work only if the input of the field does not contain what is defined in the condition
3. Add Logic Jumps to the Date question type
With the Date field you have the following options:
- is on
- is not on
- is before
- is before or on
- is after
- is after or on
This lets you send respondents down a different route based on the date they input.
When would you use this? One use-case could be that you’re asking for date of birth, but you’d like to limit the Date field so that only a certain range can be selected. See it at work here:
How to build it?
- Add your Date field question.
- Then add a Statement field following the Date field in this case saying something like “Sorry, that doesn’t seem like a valid birth date, please try again”.
- Go back to your Date field and add the following Logic jumps:
- Remember to add a Logic Jump to the Statement which directs the respondent back to the Date field!
4. Add Logic Jumps to Numerical question types or based on the Score variable
- is equal to
- is not equal to
- is lower than
- (is) lower than or equal to
- is greater than
- (is) greater than or equal to
Using “score-based” conditional logic: in addition to questions, you can also use a “score-based” logic to direct respondents to different questions. To do this, you’ll need to add Calculator to your typeform. Here you can see how to add a score, instead of a question, as a condition:
Check out these use cases:
5. Add Logic Jumps based on Hidden Fields variables
To learn what Hidden Fields are, please see this Help Center article.
There are two ways to add logical conditions based on Hidden Fields variables:
- Add Logic directly to the Hidden Fields bar
- Add Logic to any question and select the Hidden Field variable
Add your conditions to the Hidden Fields bar by following these steps:
- Make sure you switch the Hidden Fields toggle to “ON”
- Add Logic Jumps to the Hidden field bar (pass your mouse over it to see the Logic jump menu):
- Select the Hidden Field variable in the “If” condition:
In this example, we are telling the typeform that if the Hidden Fields value is not empty, the respondent will see the personalized greeting. However, if there is no Hidden Field variable passed for “name”, the respondent will see a question asking for a name. This will make your typeform more intelligent, and you won’t have to bore your audience asking them questions you already know the answer to.
This is what the URL will look like when you distribute your typeform with one Hidden Field called “name” in it: https://example.typeform.com/to/G7X61U?name=xxxxx
- First test what happens if you have a name passed in the Hidden Field by replacing the “xxxxx” part in the URL with a name like this: https://example.typeform.com/to/xs3XD0?name=Andy
- Then test what happens when no name is passed in the Hidden Field by simply removing the “xxxxx” from the URL so it looks like this: https://example.typeform.com/to/xs3XD0?name=
Add your conditions based on Hidden Fields variables to any question inside the form: based on the nature of the Hidden Field, you’ll see the same options as under 2. Add Logic Jumps to open-ended questions. Just make sure you select the Hidden Field variable when adding condition to the question:
How to add several conditions on one question
You can use AND and OR operators to add several conditions to a single Logic Jump.
In our example below the conditions are:
If Answer to Question #1 is [Apple AND Orange] OR [Mango], then jump to Question #3 “Are you sure?”.
Note the way Logic works in this example includes both options: [Apple AND Orange] OR [Mango].
So respondents will be redirected to Question #3 if their answer was:
- Apple AND Orange
If you want respondents to answer Question #3 if they select
- Apple AND Orange
- Apple AND Mango,
then you’ll use logic in the following way: