Maintenance in progress. Stability is not guaranteed for test users — please report issues if something breaks.
OpinForgeInsight through inquiry

Help center · Survey logic

Survey logic — step by step

Start with ten interactive demo surveys (no sign-in), read Coming from another survey platform if you are migrating, then work through recipes for screen-outs, skip ahead, show/hide, variables, testing, and quotas.

Start here · no account needed

Try 10 live demo surveys

Full questionnaires with screen-outs, nested AND/OR, skip paths, show/hide, and conditional required — take one as a respondent or open Explore logic to see the same builder panels we use in the workspace.

Interactive · try in your browser

Live Demo Surveys

Ten ready-made questionnaires — HR, presidential and local political research, education, and events. Each one ships with multi-rule logic you can try immediately.

Human resources

  • Engagement pulse

    Employment type, nested low-score follow-up, conditional required

    • Screen out
    • Skip section
    • Hide question
    • OR conditions
    • +2 more

    6 logic rules · saved test scenarios

  • Exit interview

    Tenure screen-out, regrettable-loss block, comp hide for involuntary

    • Screen out
    • Hide question
    • Show with nested tenure
    • Skip to section
    • +1 more

    5 logic rules · saved test scenarios

Presidential political

  • National horse race

    Voter screen, ballot leaner, party-based approval (OR)

    • Screen out (×2)
    • Skip section
    • Hide leaner
    • Show with OR
    • +1 more

    6 logic rules · saved test scenarios

  • Issues & mood

    Issue follow-ups, foreign-policy hide, party/issue nested show

    • Show by issue (OR)
    • Nested party + issue
    • Hide section
    • Skip to section
    • +1 more

    6 logic rules · saved test scenarios

Education

  • Course evaluation

    Online vs campus, grad ethics block, nested low-rating comment

    • Screen out
    • Hide campus block
    • Show for grad (OR)
    • Nested AND + OR
    • +1 more

    5 logic rules · saved test scenarios

  • Parent / district survey

    Residency screen-out, school-level skip, athletics show

    • Screen out (×2)
    • Skip section
    • Hide question
    • Nested enrolled + level
    • +1 more

    5 logic rules · saved test scenarios

Local political

  • Mayor race

    City residency, municipal ballot leaner, incumbent path

    • Screen out (×3)
    • Hide leaner
    • Skip section
    • Nested resident + vote (OR)

    6 logic rules · saved test scenarios

  • School board & bond

    Homeowner gates, parent/senior nested OR, parcel tax hide

    • Hide for renters
    • Nested owner + (parent OR senior)
    • Skip section
    • Show + require

    5 logic rules · saved test scenarios

Event feedback

  • Conference feedback

    Track branching, NPS detractor path, virtual sponsor hide

    • Screen out
    • Hide sponsors
    • NPS band (OR)
    • Nested in-person promoter
    • +1 more

    6 logic rules · saved test scenarios

  • Gala & fundraising

    Auction path for in-person bidders, donation intent skip

    • Screen out
    • Hide auction for virtual
    • Nested in-person + bid
    • Skip section
    • +1 more

    5 logic rules · saved test scenarios

On each card: Try live demo walks through as a respondent; Explore logic opens the Logic, Test logic, and Variables tabs (changes on that page are not saved). Workspace admins can run npm run db:seed:logic-showcase to publish stable /s/showcase-… links for client review.

Coming From Another Survey Platform

OpinForge is built for your fielding workflow — voter lists, personal links, team review, and exports — not as a one-for-one copy of any other product. Many teams arrive with years of surveys and custom logic habits from a previous tool; this section explains how our logic works, what maps today, and what we are building next.

Plain-language rules instead of custom scripts

Proprietary scripting engines and full editor surfaces from other platforms are not imported here. Rebuild branching with plain-language IF/THEN rules (Edit → Logic), per-question skip on the workspace, Variables from your invite list, and Test logic before publish.

That trade-off is intentional: most political and research questionnaires — screen-outs, party branches, skip ahead, show/hide, list-driven tokens — do not need custom code. Deep matrix scripting, block loops, and integration actions are a multi-phase program; we prioritize paths with the highest return for your live surveys first.

Familiar habit → OpinForge

  • Skip / page logic / branch on an answer → Edit → Logic (IF/THEN) or per-question Logic → skip rule on the workspace canvas.
  • System variables / custom variables from a list → Edit → Variables (invite list / profile, URL parameters, constants).
  • Show question only when prior answer = X → Edit → Logic → IF question equals [pick from dropdown] → THEN Show question.
  • Screen out / terminate → THEN End survey (optional screen-out message and redirect), or per-question skip → End of survey.
  • Randomize with anchors at bottom → pin icon on each choice or Settings → randomize (Something else / None of the above stay at end).
  • Other (please specify) → checkbox on choice questions, message icon on a single answer, or specify box below Yes/No and ratings.
  • Test paths before fielding → Edit → Logic → Test logic (save scenarios) plus Preview from the Edit tools menu.
  • Team review without full data access → Distribute → Email → Team access (invite by email) or Team in the sidebar for full members.
  • Custom script engines → not supported; redesign with rules above or scope custom work after a migration audit.
  • Custom scoring scripts → use Variables + Set variable rules where possible; complex scoring may need a phased rebuild.

Recommended migration workflow

  1. Pick one live survey from your previous platform that represents your hardest branching (screener + main questionnaire).
  2. List every branch: what answer or list field triggers it, and what should happen (show, hide, skip, end, redirect).
  3. Rebuild questions on Edit → Workspace in the same respondent order; use blocks to match pages.
  4. Add Variables for list columns and URL tokens before logic rules that reference them.
  5. Add IF/THEN rules on Edit → Logic; use per-question Logic for simple single-answer jumps.
  6. For screen-outs that need a partner return URL, configure Screen-out redirect on the End survey rule (separate from Finish Options for completes).
  7. Run Test logic for each path (screen-in, screen-out, party branches), then Preview as a respondent.
  8. Publish and test a personal /r/… link from Distribute before wide send.
  9. Repeat for remaining surveys; flag any rule you cannot express — those drive the product roadmap.

Recipe index (step-by-step in this guide)

  • Survey logic — where to start (overview and workflow)
  • Screen out a respondent (end survey)
  • Jump to a question or section
  • Skip ahead after one answer (per-question Logic)
  • Combine conditions (AND / OR)
  • Show or hide a question
  • Show or hide an answer choice
  • Variables for list and URL data
  • Test logic before you publish
  • Quotas and logic
  • Contact list import and logic

Start with Live demo surveys at the top of this guide if you want to see working examples before editing your own survey. Use the (?) help icons in the builder — they open the matching recipe in a compact window without leaving your questionnaire. Newest Features includes a Screen-out redirect (End survey) template you can apply from Choose template.

Survey Logic — Where To Start

Open any survey in your workspace, then use Edit → Logic for IF/THEN rules. Logic autosaves as you edit; fix validation errors before Publish.

Not sure how branching works yet? Start with the live demo surveys above — take one end-to-end, then open Explore logic on the same survey to see the rules behind it.

You have two complementary tools. Use them together for most real-world questionnaires. Illustrated steps can include screenshots saved under public/how-to/survey-logic/ — we will add figures to each recipe as UI captures are ready.

  • Edit → Logic — IF/THEN rules (Add rule): show, hide, require, enable, disable (read-only), jump to a later question or section, end survey, show/hide a single answer choice, or set variable when conditions match. Combine conditions with And/Or at the top level and nested Add OR/AND group boxes for parentheses-style logic.
  • Per-question Logic on the workspace — on multiple-choice questions, set skip branching (answer A → jump to Q2, else continue).
  • Edit → Variables — tokens from the invite list, URL parameters, constants, or copied answers. Reference them in IF conditions as {party}, {age}, etc.
  • Test logic (bottom of Edit → Logic) — enter mock answers and variable values, run the checker, and save named scenarios before fielding.

Recommended workflow

  1. Build all questions and blocks first (including the thank-you page — every survey has one).
  2. Add variables if you use personal links, URL tracking, or list fields (party, age, precinct).
  3. Add IF/THEN rules or per-question Logic on the Workspace canvas for the paths you need.
  4. Run Test logic, then open Preview from the Edit tools menu to click through as a respondent.
  5. Publish when Edit → Logic shows no blocking errors (Publish is disabled until critical issues are fixed).

Screen Out A Respondent (end Survey)

Use this when one answer means the person should not continue — for example “not registered to vote” or “under 18.” By default they are recorded as screened out (terminated), not as a complete. You can show a short message and/or send them to a partner URL — that path is separate from Finish Options used for successful completes.

Option A — Edit → Logic (good for several conditions)

  1. Open the survey → Edit → Logic → Add rule.
  2. Under When, choose the question (or variable) to test, the operator (usually equals), and the answer value or token.
  3. Under Then, choose End survey (no target question needed).
  4. Optional — Screen-out redirect URL (HTTPS) with `{variable_code}` tokens from Edit → Variables (URL params / invite fields), Show message briefly before redirect, and Screen-out message (HTML). Leave these blank to end without a partner redirect.
  5. Leave the rule enabled. Repeat Add rule for each separate screen-out path.
  6. Scroll to Test logic: enter the answer that should screen out, click Run test, and confirm the matched rule shows End survey.
  7. Use Preview from the Edit tools menu and select that answer to confirm the message and redirect (or a clean end) — you should not see the Finish Options thank-you/redirect for completes. On the live link, answering the last choice question auto-submits (Complete still appears as a fallback for checkboxes / open ends).

Option B — Skip ahead on one question (fastest for a single answer)

  1. On Edit → Workspace, click the screening question (e.g. registered to vote?).
  2. Click Logic on the question card → Add skip rule.
  3. Set When answer equals the screen-out choice (e.g. No).
  4. Set Jump to → End of survey.
  5. For a partner redirect or custom screen-out message, add or edit a matching End survey rule on Edit → Logic (skip-only ends without those options).
  6. Leave other answers on the default path (they continue to the next question on the same step or the next step, depending on your page breaks).

Records and hard discard

  • Default — keep a screened-out response (outcome terminated). It does not count as a complete and is excluded from quota fill for completes.
  • Hard discard — Platform Admin can enable “Hard terminate discard” for an organization. When allowed, an End survey rule may opt into Do not keep this response (no durable row).
  • Finish Options (Edit → Finish Options) only apply after a successful complete — never for End survey screen-outs.
  • Template — Newest Features → Screen-out redirect (End survey) is a ready-made demo of message + redirect.

Jump To A Question Or Section (edit → Logic)

Use Jump to under Edit → Logic when an IF/THEN rule should send respondents forward — for example after a screener block or when several answers should skip the same later pages. This is separate from per-question Logic on the Workspace canvas.

  1. Edit → Logic → Add rule.
  2. When — your condition(s); use Add condition, And/Or, or Add OR/AND group for nested logic.
  3. Then — Jump to.
  4. Target kind — Question (one field), Section (first question in that section box), or End survey for the thank-you page.
  5. Pick the destination from the dropdown (sections appear as Section: … with the section title from the builder).
  6. Test logic and Preview: confirm the path lands on the first question of the target section or the chosen question.

Jump to must target a question or section that comes later in respondent order. If validation complains, reorder steps in the builder or pick a later destination.

Skip Ahead After One Answer

Jump respondents past questions they should not see — for example skip the ballot test when they are undecided. Works on multiple choice and checkbox questions with answer choices.

  1. Build the questionnaire in the order respondents should normally see it, including any questions that only some paths need.
  2. Select the question that triggers the jump on Edit → Workspace.
  3. Click Logic on the question card → Add skip rule.
  4. When answer equals — pick the choice that should trigger the jump (use the dropdown; do not type choice text by hand).
  5. Jump to — pick a later question, an instruction (HTML) block, a section, or End of survey for the thank-you page.
  6. Add another rule if several answers should jump to different places.
  7. Preview: answer with the triggering choice and confirm later questions on that path are skipped; answer with a non-triggering choice and confirm the next question appears.

Skip ahead hides questions between the current question and the jump target on that path. You do not need separate hide rules for questions in the skipped range.

Combine Conditions (and / OR And Nested Groups)

Use this when one rule needs parentheses-style logic — for example show a block only when party is D and (Q1 is Yes or Q2 is Yes).

  1. Edit → Logic → Add rule (or open an existing rule).
  2. Under IF, use Add condition for each simple test (question or variable, operator, value).
  3. Set And or Or at the top of the IF block when you have more than one item — all items at that level are combined with the same And/Or.
  4. Need a subgroup? Click Add OR/AND group. The nested box gets its own And/Or and its own conditions — like parentheses in a spreadsheet.
  5. Example: IF And — variable party equals D — nested group Or — Q1 equals Yes — Q2 equals Yes. Then — Show question → your follow-up.
  6. The rule list shows a plain-English summary; expand the rule to edit. Use Test logic to confirm the rule matches your mock answers.

You can nest up to a few levels. If the tree gets too deep, split into two simpler rules instead.

Show Or Hide A Question

Use IF/THEN under Edit → Logic when a question should appear only for some respondents — for example show a follow-up only if they said Yes on an earlier question.

Show a question when a condition is met

  1. Add the follow-up question to the survey (it can live on a later step).
  2. Edit → Logic → Add rule.
  3. When — select the earlier question, operator (e.g. equals), and value (e.g. Yes). To combine conditions, use Add condition and set And or Or. For (A and B) or C, use Add OR/AND group.
  4. Then — Show question → pick the follow-up question.
  5. By default, questions without a Show rule stay visible. If you use Show rules for a block of questions, add Show rules for every question that should appear on that path, or start with a Hide rule on questions that should stay hidden until opened.
  6. Test logic: set the When answers, run test, and check the visible-questions list.

Hide a question when a condition is met

  1. Edit → Logic → Add rule.
  2. When — your condition (e.g. prior question equals No).
  3. Then — Hide question → pick the question to remove from that path.
  4. Preview both sides of the condition to confirm the question disappears only when expected.

Show Or Hide An Answer Choice

Use when one option should only appear for some paths — for example show “Other party” only when party is Independent.

  1. Edit → Logic → Add rule.
  2. When — test the question or variable that controls visibility.
  3. Then — Show answer choice or Hide answer choice → pick the question, then the choice value from the dropdown.
  4. Preview: confirm the choice appears or disappears when the When condition is true.

Set A Variable From A Rule

Store a token mid-survey when a condition matches — for example tag a segment after a screener answer, then use {segment} in later IF rules.

  1. Edit → Variables → Add variable → set Code (e.g. segment) and Source (constant is fine for rule-set values).
  2. Edit → Logic → Add rule → When — your condition (question or variable).
  3. Then — Set variable → pick the variable → Value: a literal (qualified) or {questionName} to copy an answer.
  4. Add later rules that reference {segment} in IF conditions, or use Test logic to fill the variable row manually.
  5. Variables with Source Set from answer still work for automatic copy; Set variable rules override or supplement that when you need branching logic.

Enable Or Disable A Question (grey Out)

Use when a question should stay visible but not editable until a condition is met — for example grey out a follow-up until the respondent picks Yes on an earlier question.

  1. Edit → Logic → Add rule.
  2. When — the condition that should control editability.
  3. Then — Enable question → pick the target (respondent can answer only when the condition is true).
  4. Or Then — Disable question → pick the target (field becomes read-only when the condition is true).
  5. Pair with Show question if the field should also be hidden on some paths; Enable/Disable only affects whether the control accepts input.
  6. Preview and Test logic to confirm the field greys out or becomes active on each path.

Require A Question Only Sometimes

Make a follow-up required only when it is shown — for example require an explanation only when Yes was selected.

  1. Ensure the follow-up is shown with a Show question rule when needed (see Show or hide a question).
  2. Edit → Logic → Add rule with the same When condition.
  3. Then — Require question → select the follow-up.
  4. Do not mark the question Required on the General tab unless it should always be required.
  5. Preview: on the path where it shows, try Next without answering — validation should block; on other paths the question should not appear.

Variables For List And URL Data

Variables let logic use data that is not a survey answer — invite list columns, any URL query parameter on the public link, or constants you set in Test logic. Captured values are stored on each response and included in CSV/SPSS exports as var_* columns.

  1. Open the survey → Edit → Variables.
  2. Click Add variable (or a suggested chip).
  3. Set Code — the token name used in logic as {panelist_id}, {utm_source}, etc.
  4. Set Source to URL parameter for online panel / tracked links. Set URL / query field to the exact query key (for example panelist_id for …?panelist_id=ABC). If left blank, we use the variable code.
  5. Set Source to Invite list / profile for personal /r/… links and imported list columns.
  6. Under Edit → Logic, add When clauses with subject kind Variable and the token code.
  7. Publish after saving — variable definitions ship with the published survey.
  8. In Test logic, fill the variable row with a sample value before Run test.

Any query parameter on the public survey URL (except t, c, v, r) is available to URL-source variables. Values are saved on the response, exported as var_{code}, and can be passed through finish-option redirect URLs using {code} placeholders.

Test Logic Before You Publish

The Test logic panel at the bottom of Edit → Logic simulates answers without collecting real responses.

  1. Open Edit → Logic → scroll to Test logic.
  2. For each relevant question, enter a mock answer (dropdowns match choice values).
  3. Fill variable tokens if your rules use {party}, quota flags, or URL fields.
  4. If the study uses quotas, toggle Quota closed to simulate a full quota cell.
  5. Click Run test. Review which rules matched and which questions would be visible on that path.
  6. Click Save scenario to store the inputs; load scenarios from the list when testing another path.
  7. Still use Preview from the Edit tools menu and click through as a respondent — Test logic does not replace a full walkthrough.

Quotas And Logic

Quota targets are set on the study. When a cell is full, fielding can set tokens you reference in logic.

  1. On the study, configure the quota grid (targets per segment).
  2. On Edit → Variables, add or use suggested quota tokens such as quota_closed or quota_overall_full (constant source — values come from the live link at runtime).
  3. Edit → Logic → Add rule: When {quota_closed} equals true (or the token your deployment uses) → Then End survey.
  4. In Test logic, turn on Quota closed and run test to verify the terminate rule fires.
  5. Response outcomes in exports: Complete, Screened out, or Quota full.

Import And Logic

Use Distribute → Email → Lists to upload any CSV contact list and create personal /r/… links. Choose the unique ID column during import; other columns are stored as profile fields for logic variables. For import progress, resume after failure, and reusing lists across surveys, see How to → Contact list import.

  1. Publish the survey (import is blocked on drafts).
  2. Distribute → Email → Lists → upload your CSV and confirm the detected format and ID column.
  3. Edit → Variables → Add variable → Source Invite list / profile → match the variable code to your list column name (or pick a state voter-file field for 44-column imports).
  4. Edit → Logic → Add rule → When subject Variable {your_code} equals the value you need → Then show, hide, require, or End survey as appropriate.
  5. Test logic → fill the same variable tokens with sample values → Run test, then Preview with a personal link from Audience.

Audience lists every personal invite, supports CSV export of short URLs, and lets you revoke or regenerate a link. Large lists (up to 250,000 rows) show import progress as saved contacts / ~rows in file. If import stops partway, choose Existing list and re-import the same CSV — see How to → Contact list import.

Import And Logic

Legacy anchor for 44-column state voter registration export (any state using this layout) imports — see the contact list import section above.

State voter registration files that use the standard 44-column layout can be imported via Distribute → Email → Lists by choosing the state voter file format when prompted.

Advanced Patterns & Troubleshooting

Jump to (Edit → Logic) vs per-question Logic (Workspace)

  • Per-question Logic — tied to one multiple-choice or checkbox question; best when a specific answer should jump forward.
  • Jump to (Edit → Logic) — one rule can combine several When conditions (including variables) and send respondents to a question, section, or end.
  • You can use both on the same survey; Preview and Test logic are the best way to confirm paths do not conflict.

Out of scope for logic v1

  • Panel complete / screen-out / bot return URLs with respondent IDs — End survey supports a fixed screen-out redirect URL and optional message today; dynamic IDs in the return URL are still limited (use Variables / export for vendor reconciliation where needed).
  • Matrix row/column IF and ranking logic are not in the IF builder yet.
  • For checkbox screeners, use Logic → “choices selected is at least …” on checkbox questions (validation min/max still works on the Validation tab).
  • Custom scripting from another platform — use Edit → Logic, Edit → Variables, and Set variable rules instead.

Use Insert example on Edit → Logic as a starting template, or start from a live demo above and open Explore logic to see a full working rule set.

← Back to homepage