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.
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:
- If the URL contains
?<key>=<value>, that value is captured. - Otherwise, the
defaultValue(if set) is captured. - Either way, the value is submitted along with the form's regular fields under
__hidden__<key>.
Use Cases
| Scenario | Example |
|---|---|
| UTM tracking | key: utm_source, defaultValue: (auto-captures ?utm_source=fb) |
| Referral codes | key: ref, defaultValue: (capture ?ref=alice) |
| A/B test variant | key: variant, defaultValue: control |
| Internal campaign tag | key: campaign, defaultValue: q4_promo |
| Pre-fill a hidden value from another tool | key: external_id |
Adding a Hidden Field
- Open Hidden Fields & Variables panel (right panel when no screen is selected).
- Under Hidden Fields, click + Add.
- Set Key — the URL parameter name (e.g.
ref). - Set Default Value — the value to use if the URL doesn't contain that param.
- Optionally set Save to Contact Field — map the captured value onto a standard or custom contact property, not just the submission.
- 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
| Type | What It Stores |
|---|---|
| Number | Integer or decimal (most common for quiz scoring) |
| Text | A string |
| Score | Special 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
- Open the Hidden Fields & Variables panel.
- Under Variables, click + Add.
- Pick a Type (
Number,Text, orScore). - Give it a Name (e.g.
score). - Set a Default Value (typically
0for score variables). - Save.
Variable Operations
A variable operation is a rule that fires when a specific field is filled. Each operation has:
| Field | What It Does |
|---|---|
| Variable | Which variable to update |
| Field | Which 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. |
| Operation | add / subtract / multiply / divide / set |
| Operand | The 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:
- Add a
scorevariable (type: Score, default:0). - 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
- Variable:
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 Element | Built From |
|---|---|
| The questions | Regular conversational form screens |
| The "right" / "wrong" scoring | Variable operations with fieldValue filters |
| The result | Ending screens with conditions on the variable |
| The result display | showScore on the ending screen |
Next Steps
- Ending Screens — Show different thank-you screens based on variable conditions
- Multi-Screen & Branching — Branch routes for path-based quizzes
- Submissions — How
__hidden__*values appear in submission data