Repeat pages with a Loop
A Loop presents the same content once for each item. Each iteration collects its own answers. Use it for repeated ratings, trials, or within-participant study conditions.
Example: evaluate both browser extensions
Use the study design example with a within-participant Permission factor and two levels, Broad (adblock) and Simple (pomodoro timer).
- Add Loop in Flow after Study assignment.
- Set Repeat over → Study factor levels and choose Permission in Within-participant factor.
- Move the Extension evaluation group into the Loop. Its overview, explanation branch, and decision page now run once per Permission level.
- In Content, insert the Permission-controlled
Extension name,Description, andCapabilitiesfields on the overview page. Follow Study placeholders to create and insert these fields. They show which extension is currently being evaluated. - Choose Random shuffle to vary which extension comes first, or Authored order to follow the saved level order.
- In Preview, answer the installation question differently for the two extensions and complete both iterations. Preview does not save a completed response; check a published pilot export to verify the separate recorded answers.
Choose the repetition source
| Repeat over | Use it for |
|---|---|
| Fixed repeat count | Repeat content a known number of times. Set Repeat count to a positive whole number. |
| Authored finite list | Repeat over named items, one `key |
| Study factor levels | Repeat over the levels of a within-participant study variable. Select it in Within-participant factor. Each level needs a nonblank, unique title; JavaScript and CSV use that title to identify it. |
For Authored finite list, enter one item per line in Items · stable key | display text, such as practice | Practice trial and main | Main trial. The part before | is the item key, used in JavaScript reads and CSV column headings. The part after | is display text, used to label repeated pages in Preview. Keep the key unchanged when renaming or reordering the display text. Use study factor levels and study placeholders when the participant-facing question text should change with each repetition.
While-condition and answer-driven loops are not available. Define a finite set before publishing.
Choose the order
- Authored order follows the saved list.
- Random shuffle chooses a random order for the participant.
- Counterbalanced rotation varies which item comes first while preserving cyclic order. With A, B, C, the rotations are ABC, BCA, and CAB; it does not generate all six permutations.
An order is saved when first reached and reused when resuming that response. To check specific orders before publishing, use the Loop order control in Preview.
Counterbalancing and nested order settings
Counterbalanced rotation uses a deterministic cycle of starting positions, with equal weights by default. Counts apply separately to each Loop, published version, and assigned participant profile. For the extension example, the two starting orders are balanced separately within each Priming profile among responses that reach the Loop; an incomplete cycle or dropout can leave unequal counts. When a Loop chooses orders independently for outer iterations, each outer context has its own cycle.
For a Loop inside another Loop, expand Advanced loop settings. Reuse for every outer iteration keeps the inner order for that participant; Choose independently per outer iteration chooses it again for each outer item. Independent choices can still produce the same order.
For example, put a question-order Loop inside a video Loop. Reuse gives a participant the same question order for every video; independent selection can vary it between videos.
For several within-participant factors, nest one Loop per factor to present every combination. See Study design and assignment.
Example: rate each product at two temperatures
Nest one Loop inside another to collect every combination. This Preview exercise uses authored finite lists to check that four answers stay separate:
Products: tea | Tea, coffee | Coffee
└─ Temperatures: hot | Hot, cold | Cold
└─ Page: a Text question asking for a rating
- Add a Loop in Flow for Products. Set Repeat over → Authored finite list and enter
tea | Teaandcoffee | Coffeeon separate item lines. - Inside it, add another Loop for Temperatures. Set Repeat over → Authored finite list and enter
hot | Hotandcold | Coldon separate lines. - Put the rating page inside the temperature Loop and set its Text question prompt to
Rating. - With Authored order on both Loops, Preview presents tea/hot, tea/cold, coffee/hot, then coffee/cold. Enter
4,3,5, and2to distinguish the answers.
Preview labels the repeated pages Tea / Hot, Tea / Cold, and so on. The question prompt itself stays the same in this exercise. Each combination stores a separate answer; changing presentation order does not move an answer to another combination.
The CSV keeps one row per completed response and one answer column per combination, such as Rating [tea / hot]. Separate order columns record the outer item order and the inner item order for each outer item. See Loop answers and order in exports.
If you need calculations using these answers, see Read repeated answers in JavaScript.