Conditionals

Control what content appears based on user responses.

Conditional Logic (SHOW_IF)

Show or hide questions based on previous answers.

Usage

  • Use SHOW_IF: condition to conditionally hide/show questions
  • Place below a question or after question options to apply to that question
  • Can also be placed after blocks, pages, or individual question options
  • Supports operators: ==, !=, >, <, >=, <=, AND, OR, NOT
  • For complex multi-line conditions, use triple-quote delimiters: SHOW_IF: """ ... """

Example

Q: Do you have pets?
- Yes
- No
VARIABLE: has_pets

Q: What kind of pet?
- Dog
- Cat
- Bird
- Other
SHOW_IF: has_pets == Yes

Do you have pets?

Conditional Options

Use - SHOW_IF: to conditionally show or hide individual options based on previous responses.

Usage

  • - SHOW_IF: is placed as a sub-item under the option it controls
  • The option is hidden when the condition is false
  • Works with multiple choice, checkbox, and matrix questions
  • Uses the same condition syntax as question-level SHOW_IF:

Example

Q: Are you a business customer?
- Yes
- No
VARIABLE: business

Q: What type of account do you need?
- Personal
- Business
  - SHOW_IF: business == Yes
- Enterprise
  - SHOW_IF: business == Yes

Are you a business customer?

What type of account do you need?

Conditional Text

Display dynamic text based on variables and conditions.

Usage

  • Use {IF condition THEN text ELSE text} syntax for conditional text
  • Inserts conditional text within question text or page text
  • Dynamically changes question wording based on previous responses
  • ELSE part is optional

Example

Q: Are you a student?
- Yes
- No
VARIABLE: student

Q: {{IF student == Yes THEN What is your major? ELSE What is your occupation?}}
TEXT

Are you a student?

What is your occupation?

STARTS_WITH Operator

Test multiple variables with a common prefix at once.

Usage

  • Use STARTS_WITH prefix == value to test multiple variables with a common prefix
  • Tests if ANY variable starting with the prefix meets the condition
  • Uses OR logic: true if at least one matching variable satisfies the condition
  • Example: STARTS_WITH fraud == Yes checks all variables starting with "fraud"
  • Useful for grouped questions with common variable naming patterns

Example

Q: Did you witness fraud?
- Yes
- No
VARIABLE: crime_fraud

Q: Did you witness theft?
- Yes
- No
VARIABLE: crime_theft

# **Follow-up**
SHOW_IF: STARTS_WITH crime == Yes

Q: Please provide details
ESSAY

Did you witness fraud?

Did you witness theft?