Overview
CX Platform forms support a powerful variable and expression system. You can reference the value of any question anywhere in the form — in titles, descriptions, labels, HTML content, logic conditions, and calculated fields — using curly brace syntax.
This lets you build forms that feel personal and responsive. Instead of static question text, you can address users by name, confirm back what they've told you, and change what the form says based on what they've entered.
Referencing question values
The core syntax is simple: wrap a question's name (not its label) in curly brackets and CX Platform will substitute the current value of that question wherever you use it.
{questionName}
For example, if a question is named firstName and the user has entered "Sarah", then anywhere you write {firstName} in the form, it will render as "Sarah".
Example — Personalised question title
Question name: firstName
Title of the next question: Thanks {firstName}, now please confirm your address.
Renders as: "Thanks Sarah, now please confirm your address."
Use the question Name, not the Title: The curly brace reference uses the question's Name field (set in the General tab of the field editor) — not the label or title displayed to the user. If the question is namedq1, you reference it as{q1}, even if its displayed title is "What is your first name?"
Where you can use variable references
Using prefilled data as variables
If a form is delivered as a private form with prefilled data, those prefilled values are also accessible via curly brace references — as long as the field's Value name is set in the Data tab of the field editor.
For example, if a field has its Value name set to surname and the form was pre-populated with the user's surname from your CRM, you can reference {surname} anywhere in the form to display that value.
Example — Confirming prefilled account data
HTML component content:
<p>We have the following details on file for your account:</p><p><strong>Name:</strong> {firstName} {surname}<br><strong>Account:</strong> {accountNumber}</p>
This renders as a personalised summary using data supplied at form creation, before the user has typed anything.
Variables in Form Logic
Curly bracket references work the same way in Form Logic conditions — which is what makes logic genuinely dynamic. You can compare one question's value against another, check whether a calculated field meets a threshold, or evaluate a combination of inputs.
/* Show a follow-up question only if the user is over 18 */
{age} >= 18
/* Show a warning if the two email fields don't match */
{email} != {confirmEmail}
/* Complete the form early if membership type is "existing" */
{membershipType} == 'existing'
Expressions in logic conditions can also use built-in functions — for example age({dateOfBirth}) to calculate age from a date field, or iif({hasPartner}, 'Yes', 'No') to return a string based on a boolean value.
Useful expression functions
Variable references are one of the most powerful tools in the form builder. Used well, they make forms feel like conversations rather than data entry — addressing users by name, confirming what they've said, and only asking what's relevant. Start with simple {questionName} references and build up to expressions and functions as you get comfortable with the syntax.