Skip to main content

Quick Start

WeSurvey Custom Logic is a powerful feature that allows you to create complex survey logic. It supports question/option display logic, content reference, randomization, answer comparison, and more, working alongside existing survey logic features.

Example

Let's say we have a survey about user habits:

  • Q1: What's your most frequently used chat app?
    • A. WeChat
    • B. QQ
    • C. Feishu
  • Q2: Do you use Moments (social feed)?
  • Q3: Why do you mainly use XXX?

We want to:

  1. Show Q2 only when WeChat (A) is selected in Q1
  2. Replace "XXX" in Q3's title with the selected option from Q1

Steps

Step 1: Access Custom Logic Editor

Click "Custom Logic Editor" in the top-right corner of the survey editor.

You'll see a split interface with logic input on the left and survey preview on the right.

Logic changes are applied instantly to the preview area when valid.

Step 2: Enter Logic

Enter custom logic in the left editor based on your requirements.

For "Show Q2 when Q1A is selected", enter:

if Q1A1 then show Q2

After entering, if there are no errors, Q2 will be hidden in the preview area until the first option of Q1 is selected.

To "Replace 'XXX' in Q3's title with Q1's answer", add:

replace "XXX" in Q3 title with Q1

After verifying the logic works in the preview area, click "Save" in the top-right corner.

Your survey with custom logic is now complete!

Tips

When there are errors in your custom logic, all custom logic will be disabled. You can see which line has an error in the left input area.

Note

WeSurvey Custom Logic is currently free to use during beta, but will have usage restrictions in the future.

Learn More