Pages
`- page:` is the screen unit. A page is a strict, flat list of questions — that's it. Sub-grouping, conditional sub-trees, and scripts all live outside the page. The constraint is deliberate: pages stay predictable, exports stay clean, data quality stays high.
What - page: is
A page is one screen for the respondent. The respondent fills in every question on the page, then clicks Next to advance.
A page contains only questions or nested pages — nothing
else. No blocks, no loops, no - if: flow blocks, no - script:,
no - note:. The constraint is intentional:
- The respondent’s screen is a predictable, flat list of fields.
- Export columns map cleanly: each question on the page → one question column, no surprises from a half-rendered nested block.
- Logic is separated from presentation. Scripts and conditional sub-trees live in the flow around the page, not inside it.
- page:
id: demographics
title: A few quick details
questions:
- qid: QAge
type: number
text: How old are you?
min: 13
max: 120
- qid: QGender
type: single
text: Gender
options:
1: Female
2: Male
3: Non-binary
4: Prefer not to say
Properties
| Property | Values | Notes |
|---|---|---|
id | string | Required. Unique across the survey. |
title | string | Optional heading shown above the questions. |
if | Python expression | Hide the entire page when the expression is falsey. See Routing. |
order | fixed | random | randomEach | alphabetical | reverse | flip | Default fixed. Controls the order of questions on the page. Pages take keywords only — the expression form (see Order) applies to question options, loops, and blocks, not to page members. |
questions | nested questions | The questions rendered on this screen. Used when the children are - qid: items. Nested pages sit directly under the parent page without a questions: wrapper — see Nested pages below. |
What can go inside a page
| Child | Meaning |
|---|---|
- qid: ... | A question. Goes inside questions:. |
- page: ... | A nested page. Sits directly under the parent page (no questions: wrapper). |
page.questions with: "Only question blocks (- qid: ...) and nested pages (- page:) are allowed inside a page." If you need scripts, conditional sub-trees, loops, or notes, place them in the flow around the page — not inside it.Anything else you might want on a page lives one layer up — in the flow around the page:
| You want… | Place it… |
|---|---|
| A sub-section inside a page | Either nest a - page: to break sub-screens out, or keep questions flat with per-question if: for fine-grained visibility. |
| A loop on a page | The loop sits outside the page, around it. Each iteration of the loop renders the page once. |
A - if: flow block gating several questions | Either put the if: on the page (gates the whole screen), or use per-question if: on each question. |
| A script that runs before a page | Place the - script: block in the flow, immediately before the page. It runs as the flow reaches it, before the page renders. |
A - note: author comment | Place the note in the flow, outside the page. |
Examples
Page with a conditional visibility gate
- page:
id: parental_consent
title: Parental consent
if: QAge.value < 18
questions:
- qid: QGuardianName
type: open
text: Parent or guardian's full name.
- qid: QGuardianConsent
type: single
text: Do you (the parent / guardian) consent to participation?
options:
1: Yes
2: No
The whole page is skipped for adult respondents — they never see the questions and the answers stay null in the export.
Page with random question order
- page:
id: brand_perceptions
title: Brand impressions
order: random
questions:
- qid: QBrandA
type: gridSingle
text: Apple
options:
1: Innovative
2: Reliable
3: Premium
- qid: QBrandB
type: gridSingle
text: Samsung
options:
1: Innovative
2: Reliable
3: Premium
- qid: QBrandC
type: gridSingle
text: Sony
options:
1: Innovative
2: Reliable
3: Premium
order: random shuffles the brand questions independently per
respondent — eliminating order-effect bias on which brand they
react to first.
Per-question if: for fine-grained visibility
When only some questions on a page should be conditional, use the
if: property on each question — not a flow block.
- page:
id: media_diet
title: Media habits
questions:
- qid: QHoursTV
type: number
text: Hours of TV per day.
min: 0
max: 24
- qid: QServices
type: multi
text: Which streaming services do you use?
if: QHoursTV.value > 0
options:
1: Netflix
2: Disney+
3: HBO Max
4: Apple TV+
- qid: QHoursStream
type: number
text: Hours of streaming per day.
if: QHoursTV.value > 0
min: 0
max: 24
QHoursTV always shows. The two follow-ups appear only when the
respondent watches any TV. The condition repeats on each, but it
keeps the page strictly question-only and the visibility logic
inline where the reader expects it.
If the same condition gates a long list of questions, consider
splitting them into a second page with the if: on the page
itself — one expression instead of many.
Nested pages — sub-screens under a parent page
When a logical chapter spans multiple screens but you don’t need
the extra power of a - block: (loops, conditionals, etc.), nest
pages directly. Nested pages sit directly under the parent page
— no questions: wrapper between them. The parent sets a
shared if: or title: once; each child page is its own screen.
- page:
id: brand_chapter
title: Brand impressions
if: QSegment.value == "engaged"
- page:
id: brand_apple
title: Apple
questions:
- qid: QAppleAware
type: single
text: Have you heard of Apple?
options:
1: Yes
2: No
- page:
id: brand_samsung
title: Samsung
questions:
- qid: QSamsungAware
type: single
text: Have you heard of Samsung?
options:
1: Yes
2: No
The parent’s if: skips both child pages for non-engaged
respondents. Each child is its own click-Next screen. Reach for
this pattern when you want a chapter wrapper without bringing in
a - block:.
Script in the flow, before the page
- script: |
# Compute a segment flag the next page can read.
if QAge.value < 25 and QSpend.value > 100:
hSegment.set("young_premium")
elif QSpend.value > 200:
hSegment.set("high_value")
else:
hSegment.set("standard")
- page:
id: derived_segment
questions:
- qid: QPriorityFollowup
type: single
text: Based on what you've told us, are these priorities right?
if: hSegment.value == "young_premium"
options:
1: Yes, those match
2: No, missing something
The - script: is a sibling of the page, not a child. The script
runs as the flow reaches it; by the time the page renders, the
helper question hSegment has its value, and the question’s if:
can read it.
See Scripts for the full imperative API.
Respondent Back navigation
The Back button ships enabled by default — respondents can walk backward one page (or one standalone question) at any time. Answers on visited pages are preserved when they navigate back; forward re-execution replays any flow-scripts along the way.
To disable it for a study, use the Settings → Respondent navigation → Disable Back toggle in the builder. That flips survey_settings.backDisabled and hides the Back control across all respondents.
hAssigned pin, screener logic that can't tolerate re-execution — should either add pinning (see Patterns) or turn Back off in Settings before real fielding.Custom layout scaffold (custom: on a page)
A custom: block on a - page: becomes a layout shell. The page’s member questions render into elements you mark with data-jet-slot="<qid>", letting you build concept boards, side-by-side comparisons, or any bespoke arrangement instead of the default vertical stack.
- page: shelfConcept
text: Rate this concept.
custom: |
<div class="concept">
<div data-jet-slot="QReaction"></div>
<div class="row">
<div data-jet-slot="QAppeal"></div>
<div data-jet-slot="QRelevance"></div>
</div>
</div>
<style>
.concept { display:grid; gap:24px }
.row { display:grid; grid-template-columns:1fr 1fr; gap:16px }
</style>
questions:
- qid: QReaction
type: rating
- qid: QAppeal
type: single
options: yesNo
- qid: QRelevance
type: single
options: yesNo
Renders identically in the live respondent and the builder preview. Full details, including Jet.setValue and the shadow-DOM/light-DOM/scaffold trio: Custom HTML/JS.