Pages and endings
A form config contains question pages and can include a welcome page and one or more ending pages. Use end_logic to choose which ending a respondent sees after they submit.
Pages
The pages array is required. The start welcome page, end endings, and end_logic are optional.
Each question page has type: "form". Its ui array contains fields and display blocks in the order they appear. You can set a page id, button_label, routing with next, or randomize_order.
The next property routes respondents using conditions, with each condition containing if and go_to, and an optional default. A go_to target can be a page ID, "end", or "next". The first matching condition wins, then default; if neither applies, routing continues to "next".
Set randomize_order to a boolean to show each respondent the page's questions in their own order. Layout blocks keep their place, and the stored order does not change.
A config can also include a welcome page in start, with type: "start".
Endings
The end property can be one ending or an array of endings. An ending has type: "end" and an id.
Use end_logic to select an ending. The first matching condition wins, then default; if neither selects an ending, the first ending is used. A malformed branch is skipped. The target ending must exist. Publishing rejects invalid end logic (INVALID_END_LOGIC), including when there are no endings, a target is missing, a redirect URL is invalid, or an ending is unreachable.
The server chooses the ending at submission time, after recomputing calculations. Conditional endings and per-ending redirects run in page and tally modes, and when mode is unset.
An ending can redirect with variant: "redirect" and a redirect_url. The URL can include {{field}} to insert a URL-encoded answer or hidden-field value. Arrays are joined with commas; objects become empty. redirect_delay is in seconds, defaults to 3, and must be at least 0.
Blocks on endings
Endings hold display blocks only. Publishing rejects input fields on an ending with INVALID_END_PAGE_UI.
Display blocks include:
text,h1,h2, andh3, each with requiredcopy. Copy supports{{field}}piping.divider, with optionalcopy.image, with requiredsrcandalt.video, with requiredurl.social_links, with platform and URL pairs.external_embed, with a Calendly, Cal.com, or Google Maps embed link.result_breakdown, for a quiz review after submission. It shows nothing when the form has no scored question to review. To publish a form with this block, include at least one single-answer choice question with exactly one positive-scoring option and zero for every other option. Otherwise, publishing fails withINVALID_RESULT_BREAKDOWN.add_to_calendar, which gives respondents a Google Calendar link and an.icsfile. It shows nothing without an answered date field.
Example
This config asks for a customer type, then shows a matching ending when the answer is Enterprise. Other respondents see the default ending.
{
"mode": "page",
"pages": [
{
"type": "form",
"id": "p1",
"ui": [
{
"type": "short_text_input",
"name": "customer_type",
"label": "What type of customer are you?"
}
]
}
],
"end": [
{
"id": "e0",
"type": "end",
"ui": [
{
"type": "text",
"copy": "Thanks for your response."
}
]
},
{
"id": "e1",
"type": "end",
"ui": [
{
"type": "h2",
"copy": "Thanks, {{customer_type}} customer."
}
]
}
],
"end_logic": {
"conditions": [
{
"if": [
{
"field": "customer_type",
"operator": "equals",
"value": "Enterprise"
}
],
"go_to": "e1"
}
],
"default": "e0"
}
}