# Logic & scoring


# Logic & scoring

Logic turns a flat list of questions into a form that adapts to each respondent. You can hide questions that don't apply, require an answer only in certain cases, send people down different paths, repeat their words back to them, calculate values, and score quizzes. You set all of this up in the [builder](./form-builder).

## Conditional visibility

Use **conditional visibility** (`visibleIf`) to show a field only when an earlier answer matches a rule. For example, show "Which model do you own?" only after someone answers "Yes" to "Do you own one of our products?"

Set a field's `visibleIf` rule in the [Inspector](./form-builder#the-three-columns). When the rule isn't met, respondents never see the field — it stays hidden and isn't required.

:::tip[Keep forms short with visibility rules]

Hiding irrelevant questions makes a form feel shorter and more personal. Ask only what applies to each respondent.

:::

## Conditional required

**Conditional required** (`requiredIf`) makes a field mandatory only under certain conditions. A field can be optional most of the time but become required when an earlier answer calls for it — for example, requiring a reason only when someone selects "Other".

## Routing between pages

On multi-page forms you can route respondents to different pages based on their answers. Each routing rule has a **next target** that decides where someone goes after a page, so different answers can lead down different paths. Use it to skip whole sections that don't apply, or to branch a survey into separate tracks.

## Answer piping

**Piping** inserts a respondent's earlier answer into later text. Reference a field by wrapping its key in double curly braces, like `{{name}}`. If someone enters "Alex" in a field keyed `name`, a later question reading `Thanks {{name}}, how was your visit?` is meant to show as "Thanks Alex, how was your visit?"

:::info[Coming soon]

The piping engine that substitutes `{{field}}` tokens is built and tested, but it isn't yet wired into the public form renderer — so piped values don't appear to respondents today. Author your labels normally; piping will start resolving once it's connected.

:::

## Calculations

**Calculations** compute a value from other answers — for example, totaling line items or deriving a figure from several inputs. The calculated value can be displayed back to the respondent or used elsewhere in the form's logic.

## Scoring and score bands

Turn your form into a quiz or assessment with **scoring**. Each answer can carry a **score value** (set per field in the Inspector), and the form adds those up into a total.

To set scoring up:

1. Open **Settings** in the builder and turn on **scoring**.
2. Choose the **output key** the score is stored under.
3. Assign a **score value** to the relevant answers on each field.
4. Define **score bands** — labeled ranges that interpret the total.

A **score band** maps a range of points to a label, like "0–4 = Needs work", "5–7 = Good", "8–10 = Excellent". When someone finishes, their total and band can be shown on the [confirmation screen](./public-form#confirmation). This is how you build graded quizzes, self-assessments, and tiered results.

## Next steps

- [Set per-field score values and conditions](./field-types#per-field-options)
- [Build multi-page forms in the builder](./form-builder#multi-page-forms)
- [See what respondents experience](./public-form)
- [Publish and share your form](./publishing-sharing)
