Implementation guide
Conditional logic in forms: rules, examples and a proof test
Design reliable form branches with a five-part rule model, truth-table method, worked example and nine-case proof test.
Conditional logic changes a form when a stated condition is true. It can show or hide fields, skip pages, select an outcome, calculate a value or choose a later workflow action. A reliable rule is deterministic, has a safe fallback and can be tested as a truth table; it must not leave required information unreachable or strand a respondent in a dead end.
A five-part rule model, current product-capability check, truth-table method, worked example and reproducible nine-case branch proof test, verified against first-party Tally, Jotform and W3C guidance on September 16, 2026.
Key findings
- A complete conditional rule names an input, operator, comparison value, action and fallback; an intent such as ‘use logic for enterprise leads’ is not an implementable rule.
- A truth table should cover every meaningful combination plus blank, malformed, unsupported and exact-boundary values before the rule is built.
- The proof test must inspect the visible path, required state, result, stored data and post-submit action—not merely whether the expected page appeared.
What conditional logic means
Conditional logic changes a form or its next action when a stated condition is true. It can show or hide questions, skip pages, select an outcome, calculate a value or choose a post-submit workflow action.
A conditional rule has five parts: an input, an operator, a comparison value, an action and a fallback. “If company size is 500 or more, show the enterprise questions; otherwise continue to the standard next step” is complete. “Use logic for enterprise leads” is not.
A good rule is deterministic, has a safe default and can be tested as a truth table. It should not make required information unreachable or leave a respondent without a valid route.
Five common rule patterns
| Pattern | Example | Primary risk |
|---|---|---|
| Show or hide | Show a VAT number field for business purchases | A hidden field remains required |
| Skip or branch | Skip implementation questions for students | An unexpected answer has no route |
| Outcome selection | Recommend plan B when needs A and C match | Conflicting outcomes tie silently |
| Calculation | Quote = quantity × rate | A missing value becomes zero unexpectedly |
| Post-submit action | Add high-readiness contacts to a segment | The workflow fires before data is normalized |
Give every pattern an explicit fallback. The fallback can continue to a standard path, show a review message or record an exception, but it should never depend on whichever overlapping rule happens to execute first.
Current product examples
As verified September 16, 2026, Tally documents show-or-hide blocks, page jumps, calculated values, required-field changes, redirects and custom thank-you pages. Its rule builder supports all-or-any condition groups, and its documentation warns that complex logic can be error-prone and should be tested through different scenarios.
Jotform's conditional-logic guide, updated August 27, 2026, documents show-or-hide, calculation, require-or-mask, page skipping, thank-you changes and conditional email recipients. It likewise recommends testing an existing rule before adding more conditions.
These examples demonstrate current rule categories, not a product winner. Exact operators, nesting, plan access and workflow actions can differ by workspace and change after the verification date.
Truth-table method
Write every meaningful input combination before opening the form builder. For an enterprise branch requiring both company size of at least 500 and a start window within 90 days, the core table has four rows:
| Company size ≥ 500 | Start within 90 days | Expected route |
|---|---|---|
| True | True | Enterprise implementation path |
| True | False | Standard path |
| False | True | Standard path |
| False | False | Standard path |
Add rows for blank, malformed, unsupported and exact-threshold values. For every row, name the expected page, visible and required fields, result, stored values and post-submit action. This converts a visual branch into a specification another reviewer can reproduce.
Worked conditional-logic example
A training enquiry asks country, team size and start window. Unsupported countries reach a resource page. Supported contacts with at least 500 employees and a near-term start see enterprise implementation questions. Other supported contacts take a shorter standard path. Every route still collects the promised delivery field and ends in a valid result.
The enterprise condition can then feed the separate lead-qualification model. Keep branch logic and lead ownership distinct: showing enterprise questions does not by itself assign an accountable sales owner or prove that the respondent is qualified.
Nine-case branch proof test
Run these cases with synthetic records before publishing:
- both enterprise conditions are true;
- only company size is true;
- only the start window is true;
- neither condition is true;
- a required trigger is blank or unsupported;
- a value is exactly at the 500-person or 90-day boundary;
- an earlier answer changes after the conditional path appears;
- the respondent navigates back or attempts to open a later step directly; and
- client-side validation is bypassed or an unexpected value reaches the server.
For each case, confirm the visible questions, required state, calculation, result, stored data and workflow action. The test fails if a hidden field remains required, two outcomes tie silently, a changed answer leaves stale data active or an unsupported value reaches an undefined route.
Every case reaches the specified valid route or named fallback, and a reviewer can reproduce the decision from the submitted values and rule definition.
Accessibility and safety checks
When fields appear, keyboard focus should remain predictable and the instructions should still make sense in reading order. The W3C form-validation tutorial recommends concise, easy-to-understand error feedback associated with the relevant control; WCAG's error-identification guidance requires detected input errors to be identified and described in text.
Validate consequential rules on the server as well as the client. A hidden field must not remain required, and a skipped page should not leave sensitive data active without a defined retention or clearing rule. Test the final form on representative devices, with a keyboard and assistive technology, and through the actual integration path.
This framework does not claim a conversion lift. Logic terminology, plan gates, operator support and calculation behavior differ by platform. Recheck the chosen product and repeat the documented test method in the intended workspace.
Evidence and limitations
A five-part rule model, current product-capability check, truth-table method, worked example and reproducible nine-case branch proof test, verified against first-party Tally, Jotform and W3C guidance on September 16, 2026.
- This is an implementation framework, not a conversion benchmark or a measurement of every form builder's logic engine.
- Logic terminology, operators, calculation behavior, plan access and workflow actions vary by product and account configuration; repeat the proof test in the intended workspace.
- Representative keyboard, assistive-technology, server-validation and integration-path tests remain necessary for the published form.
Sources and verification
Current product and plan claims use the primary sources below. Internal methodology links describe the publication's own frameworks and should not be read as vendor documentation.
- Tally, Conditional form logic
- Jotform, Smart Forms: Conditional Logic
- W3C WAI, Validating Input
- W3C, Understanding Error Identification
- Lead-qualification form guide
- The Form Review testing methodology
Last materially verified .