Option/Sub-question Display Logic
Control option visibility using AND, OR, NOT logic combinations.
Unconditional Option Hiding
Example
Q1. Which short video apps have you used? [Multiple Choice]
- A. WeChat Video
- B. TikTok
Q1A2
- C. Kuaishou
- D. Miaopai
Q2. How has your TikTok usage changed in the past month? [Single Choice]
- A. Increased
- B. No change
- C. Decreased
Q3. After increasing TikTok usage, which platforms' usage time decreased? [Multiple Choice] Q3
(In the survey logic, the option reference from question Q3 is set to question Q1. All options in Q1 will appear, but according to the question context, the "TikTok" option should always be hidden in question Q3, so we need to hide option Q3A2)
Custom Logic
hide Q3A2 # Always hide TikTok option in Q3
Effect Preview
Simple Condition Option Hiding
Example
Q1. How long do you use TikTok every day? [Single Choice Question] Q1
- A. More than 1h
Q1A1
- B. More than 30m but less than 1h
- C. Less than 30m
Q2. How long do you use WeChat Video every day? [Single Choice Question] Q2
- A. More than 1h
Q2A1
- B. More than 30m but less than 1h
- C. Less than 30m
Q3. How long do you use Kuaishou every day? [Single Choice Question] Q3
- A. More than 1h
Q3A1
- B. More than 30m but less than 1h
- C. Less than 30m
Q4. In products used for more than 1h,which product do you like best? [Single Choice Question] Q4
- A. TikTok
Q4A1
- B. WeChat Video
Q4A2
- C. Kuaishou
Q4A3
- D. Don't like any
Custom Logic
if Q1A1 then show Q4A1 # Q1 selected A, show Q4 option A
if Q2A1 then show Q4A2 # Q2 selected A, show Q4 option B
if Q3A1 then show Q4A3 # Q3 selected A, show Q4 option C
Effect Preview
Complex Condition Option Hiding
If you need more complex conditions, you can use parentheses (), AND logic &&, OR logic ||, NOT logic ! to implement the logic you need.
Matrix Question Sub-question Hiding
Hide a sub-question in a matrix question
Example
Q1. Which payment products have you used on your phone? [Multiple Choice Question]
- A. Jingdong Wallet
- B. WeChat Pay
- C. Meituan Flash Pay
- D. Other
Q2. How many of your savings cards are bound to the following payment products? [Matrix Single Choice Question] Q2
(The sub-question references Q1, the options in Q1 will become sub-questions in Q2, but we don't want to reference options D. Other, so we need to hide this sub-question)
Custom Logic
hide Q2S4 # Always hide "Other" sub-question in Q2
Effect Preview
Matrix Question Option Reference
Currently, the ordinary function of the questionnaire only supports sub-question reference in the matrix question, but we can implement matrix question option reference through the DSL option display logic
Example
Q1. Which payment methods do you use when paying with WeChat? Q1
- A. Zero Money
Q1A1
- B. Zero Money
Q1A2
- C. Savings Card
Q1A3
Q2. Which payment methods do you use when paying with WeChat in the following situations?Q2
Matrix sub-question: 1. Online Consumption 2. Offline Payment
- A. Zero Money
Q1A1
- B. Zero Money
Q1A2
- C. Savings Card
Q1A3
Custom Logic
if Q1 then show Q2 # First question answered, show second question
if Q1A1 then show Q2A1 # First question selected "Zero Money", show "Zero Money" option in matrix question
if Q1A2 then show Q2A2 # First question selected "Zero Money", show "Zero Money" option in matrix question
if Q1A3 then show Q2A3 # First question selected "Savings Card", show "Savings Card" option in matrix question
Effect Preview
Matrix Fill-in Question Sub-question and Fill-in Column Logic
- Supports using
Q1A1
to refer to the first column of the matrix fill-in question - Supports using
Q1S1
to refer to the first row of the matrix fill-in question - You can use display logic to control the display and hiding of rows and columns
- You can also use
Q1S1A1
to refer to the first row first column filled, for conditional judgment
Custom Logic
# Matrix Fill-in Question Column Display Logic
if Q1A1 then show Q2A1
# Matrix Fill-in Question Row Display Logic
if Q1A2 then show Q2S1
# Matrix Fill-in Question Fill-in Filled Logic
if Q2S1A1 then show Q3