Building Forms
Conditional logic
Logic blocks react to what a respondent enters — show or hide any block, jump to pages, block submission, or calculate values. Layer simple rules into sophisticated branching without code.
What logic can do
Every logic block has one or more rules. Each rule pairs a condition group (when should this fire?) with one or more actions (what should happen?). Nine action types are available:
| Action | What it does |
|---|---|
| Show | Reveal a hidden block — a question, paragraph, image, or option — when conditions match. |
| Hide | Conceal a visible block — a question, paragraph, image, or option — when conditions match. |
| Make required | Dynamically require a field for certain paths. |
| Make optional | Relax validation on a required field when conditions match. |
| Set next page | Skip to a specific page — this is how you build branching |
| Calculate value | Compute totals, scores, or pricing from other answers. |
| Set payment amount | Set, increase, or decrease a Payment field price based on answers. |
| Prevent navigation to next page | Stop the respondent from advancing, with an optional message saying why. |
| Prevent submit form | Prevent submission until conditions are met (e.g. terms accepted), with an optional message saying why. |
Adding a logic block
A logic block is a document element — it sits on the canvas between questions, just like a heading or an image. You can place it anywhere: between two fields on the same page, at the top of a page, or right before a page break.
- 1
Open the slash menu
Click an empty line on the canvas and type /. The block picker appears.
- 2
Search for "Logic"
Type logic to filter. Pick Logic from the Layout category. A new logic block appears at the cursor.
- 3
Add a rule
The block reads When … Do …. Each rule has one condition group and one or more actions.
- 4
Define conditions
Pick a field, choose an operator, and set a value. Add another condition, or add a set of conditions to nest one level deeper.
- 5
Choose actions
Pick an action type (Show, Hide, Make required, Set next page, and so on) and choose the target — a question, a block, an option, or a page.
- 6
Add more rules (optional)
A single logic block can hold multiple rules. Each rule is independent: its own conditions, its own actions.
Conditions
Conditions are the When side of a rule. Each condition picks a field, applies an operator, and often compares against a value. The field picker groups what you can watch: Questions, Hidden Fields, Calculated Fields, and Metadata (today, the respondent’s locale).
All or Any
Once a rule has two or more conditions, a toggle appears at the top of the When section:
All — every condition must be true for the rule to fire. The rows read “and”.
Any — one true condition is enough. The rows read “or”.
Sets of conditions
Add a set of conditions nests a second group inside the first, one level deep, with its own All/Any toggle. That covers compound logic like “plan is Pro and (country is Norway or country is Sweden)”. A set holds conditions only — it cannot hold another set.
A hidden question has no value
If logic hides a question, the answer it may already hold counts for nothing — not in conditions, not in calculations, not in the payment amount, and not in the stored submission. The answer comes back only if the question becomes visible again. The same goes for every question inside a hidden row, column or repeating group, and for a picked option that logic hides. A page that the Set next page rules skip counts as hidden too: its questions are not required, and whatever was answered there is dropped. Hidden fields are the opposite: they always carry their value.
Keep it readable
If a single logic block feels too complex, consider splitting the logic across multiple logic blocks or restructuring your form pages.
Operators reference
The operator list is decided by the field you picked — you only ever see the ones that field supports. Below, each heading names the exact set.
Text (Text Input, Text Area, and text calculated fields)
| Operator | Description |
|---|---|
| is | Value matches, ignoring letter case and surrounding spaces |
| is not | Value does not match |
| contains | Value includes the specified text |
| does not contain | Value does not include the specified text |
| starts with | Value begins with the specified text |
| ends with | Value ends with the specified text |
| is empty | Field has no value |
| is not empty | Field has any value |
Every text comparison ignores letter case and spaces at either end, so x@Competitor.com ends with
@competitor.com.
The other text-like inputs carry a narrower set, so pick the type that matches how you need to compare:
| Field | Operators it offers |
|---|---|
| contains, does not contain, is, ends with, is empty, is not empty | |
| Website URL | contains, does not contain, is, starts with, ends with, is empty, is not empty |
| Phone Number | is, starts with, contains, is empty, is not empty |
| Hidden field (text) | The full text set above |
Numeric (Number, Star Rating, linear scale, numeric hidden and calculated fields)
| Operator | Description |
|---|---|
| is | Value matches exactly |
| is not | Value does not match |
| is greater than | Value is above the specified number |
| is less than | Value is below the specified number |
| is greater than or equal to | Value is at or above the specified number |
| is less than or equal to | Value is at or below the specified number |
| is between | Value falls within a range (inclusive) |
| is empty | Field has no value |
| is not empty | Field has any value |
Checkboxes and picture choice
| Operator | Description |
|---|---|
| has checked any of | At least one of the specified options is checked |
| has not checked any of | None of the specified options are checked |
| has checked all of | Every one of the specified options is checked |
| has checked exactly | Checked options match the specified set exactly |
| is empty | No options are selected |
| is not empty | At least one option is selected |
Dropdown and Radio Buttons (single-select)
| Operator | Description |
|---|---|
| is | Selected option matches exactly |
| is not | Selected option does not match |
| is empty | Nothing selected |
| is not empty | An option is selected |
Toggle Switch (and boolean calculated fields)
| Operator | Description |
|---|---|
| is on | The toggle is switched on |
| is off | The toggle is switched off |
Signature
| Operator | Description |
|---|---|
| is signed | A signature has been drawn |
| is not signed | No signature has been drawn |
File Upload
| Operator | Description |
|---|---|
| has file | At least one file has been uploaded |
| has no file | No file has been uploaded |
Date Picker and Time Picker
| Operator | Description |
|---|---|
| is | Exact match |
| is not | Does not match |
| is before | Before the specified date/time |
| is after | After the specified date/time |
| is between | Falls within a date/time range |
| is empty | No value selected |
| is not empty | Has a value |
Ranking
| Operator | Description |
|---|---|
| option is ranked first | The specified option is in the first position |
| option is ranked last | The specified option is in the last position |
| option is ranked above | The specified option is ranked above another option |
Matrix / Grid
| Operator | Description |
|---|---|
| row answer is | A specific row has the specified answer |
| row answer is not | A specific row does not have the specified answer |
| row is answered | A specific row has been answered |
| row is not answered | A specific row has not been answered |
Payment
| Operator | Description |
|---|---|
| amount equals | The payment amount matches exactly |
| amount is greater than | The payment amount is above the specified value |
| amount is less than | The payment amount is below the specified value |
| is completed | Payment was successfully processed |
| is not completed | Payment has not been processed yet |
Fields you cannot watch
Schedule appointment and Documents can be visibility targets but never condition sources. A booking is attached to the submission rather than stored as an ordinary answer, and a Documents block collects no answer at all. Use earlier qualification answers to show or hide either one. Every visible Schedule appointment question must be booked before submission; a hidden one does not block it. See Cal.com scheduling with logic.
Targeting
Each action needs a target — the thing it acts on. The target depends on the action type:
| Action type | Target | Example |
|---|---|---|
| Show / Hide | Any block — a question, paragraph, image, layout container, or a specific option within a choice field | Show a "Good choice!" paragraph when an option is picked |
| Make required / Make optional | A question | Require "Dietary restrictions" only for in-person attendees |
| Set next page | A page | Skip to page 5 for returning customers |
| Calculate value | A calculated field | Sum three Star Rating scores into a total |
| Set payment amount | A Payment field | Increase the price by 15 when "Rush delivery" is on |
| Prevent navigation to next page / Prevent submit form | No target needed (only the message) | Prevent submission until terms toggle is on |
Show and Hide reach beyond questions. Target any block on the canvas — a paragraph, heading, image, or layout container — to reveal a note that was hidden by default, or hide content once it is no longer relevant. They can also target individual options inside a choice field, not just the whole question. Hide a block from the block menu first, then write a rule to reveal it.
How multiple rules combine
Every rule is independent, and they all evaluate together. Rules are read top to bottom, across logic blocks, in document order. How several rules on one target combine depends on the action.
| Action | How several rules combine |
|---|---|
| Show / Hide, Make required / Make optional | Only a rule whose conditions match claims the target, so rules stack as an or: the block is shown if any matching rule shows it. A rule that does not match applies its opposite but claims nothing, so a later matching rule still wins. |
| Set next page | A jump acts when the respondent presses Next on the page with the questions it reads, and on no other page. Of the rules that act there, the first that matches wins. A rule that reads only hidden or calculated fields acts on any page, but only jumps forward. |
| Calculate value | Every matching rule runs, in order, on the running value. Nothing claims anything. |
| Set payment amount | Only a "set to" rule whose conditions match claims the price, so the first matching one owns it and a list of "set to" rules can price each tier. "increase by" and "decrease by" never claim — they stack in order on the running amount. |
| No rule matches | The block returns to its default — hidden if it was hidden by default, visible otherwise. |
So you can point several rules at one block without them fighting. A feedback form has a Radio Buttons question — “What can we help you with?” — with four options, and a “Can we contact you?” email field hidden by default. Four rules each Show that same email field (plus their own follow-up question) for their option. The email field appears no matter which option is picked, and stays hidden only if none is.
Often one rule is enough
To reveal a block for several answers, one rule with Any and a condition per answer — or a single is not empty condition to cover them all — is easier to read than four rules. Reach for several rules when each option also needs its own distinct follow-up.
Conflicting rules
When two rules disagree on the same target — one Shows a block while another Hides it, or one makes a field required while another makes it optional — and both conditions match at once, the first rule wins. The later, losing rule is flagged in the editor: “This action never applies — an earlier rule already controls its target. Rule order decides: the first rule wins.”
One ordering exception: a rule whose condition reads a calculated field runs after the rule that writes it, whatever the document order, so a score is always computed before anything branches on it. Rules that write each other’s calculated fields in a loop raise a publish warning that names the chain — break the loop so values resolve predictably.
Hidden beats required
A question that ends up hidden is never required, whether it was hidden by a rule or hidden from the block menu with no rule to reveal it. The asterisk disappears and submission is not blocked — otherwise a respondent could be locked out of a form by a field they cannot see.
Common patterns
Show a follow-up question based on a previous answer
A satisfaction survey asks “How would you rate your experience?” with a 1-5 Star Rating. A logic block below it uses the condition “rating is less than or equal to 3” with the action Show targeting a Text Area field that asks “What could we improve?” Respondents who rate 4 or 5 never see the follow-up.
Reveal a message when an option is picked
A signup form has a Radio Buttons question: “Which plan fits you best?” Below it sits a paragraph — “Good choice! Our Pro plan includes priority support.” — hidden by default with the block menu’s Hide. A logic block reveals it: if plan is “Pro”, Show the paragraph. The encouraging note appears only for Pro pickers, and stays hidden for everyone else.
Branch to different pages based on a selection
An event registration form has a Radio Buttons question: “Are you attending in person or remotely?” Two logic blocks follow:
Rule 1 — condition: attendance is “In person”, action: Set next page “Venue details”.
Rule 2 — condition: attendance is “Remote”, action: Set next page “Streaming setup”.
Rule 3 — condition: arrival time is not empty, action: Set next page “Confirmation”. Arrival time is a required question on “Venue details”.
Rules 1 and 2 read the attendance question, so they act when the respondent leaves its page. After that, Next goes on in page order. Rule 3 reads a question on “Venue details”, so it acts when the respondent leaves that page. In-person attendees then skip “Streaming setup”. Each path collects only relevant information, then both converge on a shared “Confirmation” page.
Calculate a score and branch on it
A lead-qualification form has three Star Rating questions: budget, timeline, and authority. A calculated field named “Lead score” uses a logic block with the Calculate value action to add the value of each rating. A second logic block reads the calculated field: if Lead score is greater than 12, Set next page “Priority follow-up”; otherwise jump to the standard confirmation page.
React to a hidden field value
The URL populates a hidden field named plan (e.g. ?plan=enterprise). A logic block checks: if plan
is “enterprise”, Show the “Dedicated account manager” question and Make required
the “Company size” field. Free-tier respondents never see these questions.
Gate submission on a calculated total
An order form calculates a running total. A logic block uses the condition: if Order total is less than 10, Prevent submit form. The respondent cannot submit until the minimum order threshold is met.
While a prevent rule is active, the button reads as unavailable and the respondent is told why. Type the reason into Message shown to respondent on the action row — “Your order must total at least 10” — so they know which answer to change. Leave it empty and the form falls back to “This form cannot be submitted with the current answers.” (or “You cannot continue to the next page with the current answers.” for a navigation block). When several prevent rules fire at once, the first one that carries a message supplies the wording.
Test logic with Preview
After setting up your rules, switch to Preview in the top toolbar and fill out the form as a respondent would. Logic fires in real time in Preview, so you can verify every branch, hidden field, and validation gate before publishing.