Skip to main content

Hidden Fields & Variables

Two related conversational-form features for capturing data the visitor doesn't directly see:

  • Hidden Fields — pre-populate values from URL parameters (e.g. UTM tracking, ref codes) and submit them with the rest of the form
  • Variables — accumulate numeric or text values across the form (the engine for quiz scoring)

Both live in the Hidden Fields & Variables panel of the conversational form builder.

Classic forms have a Hidden field type

On classic (non-conversational) forms, drag the Hidden field from the Advanced section instead. It has a URL Parameter Key, a Default Value, and a Save to Contact Field option — see URL Parameters & UTM Tracking for the full guide. Note that standard UTM parameters are captured onto the contact automatically on every form — you only need hidden fields for your own custom values.

Hidden Fields

A hidden field is a key/defaultValue pair. When the form loads:

  1. If the URL contains ?<key>=<value>, that value is captured.
  2. Otherwise, the defaultValue (if set) is captured.
  3. Either way, the value is submitted along with the form's regular fields under __hidden__<key>.

Use Cases

ScenarioExample
UTM trackingkey: utm_source, defaultValue: (auto-captures ?utm_source=fb)
Referral codeskey: ref, defaultValue: (capture ?ref=alice)
A/B test variantkey: variant, defaultValue: control
Internal campaign tagkey: campaign, defaultValue: q4_promo
Pre-fill a hidden value from another toolkey: external_id

Adding a Hidden Field

  1. Open Hidden Fields & Variables panel (right panel when no screen is selected).
  2. Under Hidden Fields, click + Add.
  3. Set Key — the URL parameter name (e.g. ref).
  4. Set Default Value — the value to use if the URL doesn't contain that param.
  5. Optionally set Save to Contact Field — map the captured value onto a standard or custom contact property, not just the submission.
  6. Save.

Now any visitor who hits https://yourform.example.com/f/<slug>?ref=partner42 will have ref: partner42 recorded on their submission (and on the contact, if mapped). Visitors arriving without the param get the default value (or empty if no default).

This also works when the form is embedded on another site — URL parameters on the host page are passed through to the form automatically.

How Hidden Fields Are Submitted

Each hidden field is submitted with the prefix __hidden__. So if you defined key: utm_source, the submission row's response_data JSONB includes __hidden__utm_source: facebook.

This naming convention lets you separate visitor-typed answers from URL-passed metadata when querying submissions.

Variables

A variable is a named accumulator. As the visitor progresses through the form, variable operations add/subtract/multiply/divide/set values on it. The final variable value is then available to:

  • Ending screen conditions — show different thank-you screens based on the score
  • The submission payload (so you can read it server-side)

Variable Types

TypeWhat It Stores
NumberInteger or decimal (most common for quiz scoring)
TextA string
ScoreSpecial type for quiz/assessment use cases — semantically the same as Number but signals to the system that this is a "score" for ending-screen logic

Adding a Variable

  1. Open the Hidden Fields & Variables panel.
  2. Under Variables, click + Add.
  3. Pick a Type (Number, Text, or Score).
  4. Give it a Name (e.g. score).
  5. Set a Default Value (typically 0 for score variables).
  6. Save.

Variable Operations

A variable operation is a rule that fires when a specific field is filled. Each operation has:

FieldWhat It Does
VariableWhich variable to update
FieldWhich form field triggers the operation
Field Value(Optional) Only fire if the field's value equals this. Leave blank to fire on any non-empty answer.
Operationadd / subtract / multiply / divide / set
OperandThe number to apply (e.g. 10 for "add 10 points")

When the visitor fills the field with a matching value, the operation runs against the variable. All operations re-evaluate at submit time so the final variable value reflects every answer.

Worked Example: Quiz Scoring

Goal: A 5-question quiz. Each question has multiple-choice answers; only the "correct" answer is worth 10 points. The total score decides which ending screen the visitor sees.

Setup:

  1. Add a score variable (type: Score, default: 0).
  2. For each question's "correct" option:
    • Click the field (Radio or Picture Choice).
    • In the question's options, find the correct option's value (e.g. option_1).
    • In the Hidden Fields & Variables panel, add a Variable Operation:
      • Variable: score
      • Field: this question's field
      • Field Value: option_1 (the correct value)
      • Operation: add
      • Operand: 10

After all five questions:

  • Visitor who got 5/5 right: score = 50
  • Visitor who got 3/5: score = 30
  • Visitor who got 0/5: score = 0

Now hook up ending screens to show different outcomes based on the score.

Other Operations

  • subtract — useful for negative scoring (penalize wrong answers)
  • multiply — for weighted scoring (e.g. multiply by 2 for harder questions)
  • divide — to compute averages
  • set — overwrite the variable; useful for "best of" logic where a single answer determines the variable's final value

How Variables Reach the Submission

When the form submits, the system computes every variable based on the visitor's answers and the operation chain. The variable values are written to window.__votelFormVars for the ending-screen render to read. The submission row itself records the visitor's raw answers; if you want the computed variables in the row too, you can add them as Hidden Fields with a defaultValue that gets overwritten on submit.

Quiz vs Survey

A "quiz" is just a survey with variables + ending screens. The mechanics are identical:

Quiz ElementBuilt From
The questionsRegular conversational form screens
The "right" / "wrong" scoringVariable operations with fieldValue filters
The resultEnding screens with conditions on the variable
The result displayshowScore on the ending screen

Next Steps