Skip to content

responseRows

Experiments Surveys & forms In surveys it turns a question into a matrix or repeated rows; on experiment trials it creates one slider per row or captions input boxes.

Turns a single question into a multi-item battery: each semicolon-separated entry becomes one row/item that is answered on the same scale. Use it for questionnaires and rating batteries where every item shares one set of answer choices.

It applies in two places:

  1. type=form trials: with rows, responseType=radio / checkboxes become a single matrix question (rows = the labels, columns = responseOptions); every other responseType becomes a panel of repeated questions, one full question per row, titled with the row text.
  2. Non-form trials (any type with a responseType set, e.g. test/practice): for responseType=slider it creates one slider per row, each labeled with the row text, and the check for untouched sliders counts the rows, but only when type is exactly test. For responseType=box/box*N the labels caption the input boxes but the box count comes from box*N, not from the rows.

List the row labels separated by semicolons: Label 1;Label 2;Label 3. Each label becomes one item, answered on the scale you define in responseOptions.

Empty segments are ignored, so a stray ; does not add a blank row. On form trials, variables and wildcards in the cell are substituted before the labels are shown; on test-trial sliders they are not.

ValueEffect
empty cell (or column absent)No rows: the question is shown as a single ordinary question
A;B;CThree rows. Form: matrix rows or three repeated questions. Test slider: three sliders labeled A, B, C
single label A (no ;)Still counts as rows: a 1-row matrix or a 1-question panel

There are no keywords or modifiers; every segment is a literal display label.

With no responseRows column, or with the cell left blank, the trial shows a single ordinary question and the results hold one value for it.

With rows, the results follow these rules:

  • Per-row responses are recorded joined by _, and per-stimulus groups joined by |. Response codes are joined the same way; each row’s code counts positions in the choices as written in responseOptions.
  • Every answer is saved in its own row’s position, taken from the row order the participant actually saw. A row left unanswered saves as NA in that row’s own position, so skipping a middle row or answering rows in any order never shifts or scrambles the other rows’ values.
  • An untouched per-row slider counts as unanswered: it records NA rather than the value the handle started at. A required slider cannot be submitted untouched.
  • If the whole multi-row question is left unanswered, no results row is saved at all for that trial.

Earlier releases collected multi-row answers in first-answer order and assigned them to rows positionally, so answering out of order or skipping a middle row misattributed values to the wrong row labels (with NA padding only the tail). Each answer is now matched to its own row before saving, so the saved response and responseCode strings are correct regardless of answer order or skips.

What that means when you read the results:

  • Matrix questions (radio/checkboxes with rows): each row’s answer lands in that row’s own position, and a row the participant never touched leaves NA there.
  • Panel and single questions (one question per row): the same holds, because each answer is matched back to the label of the row it belongs to.
  • “Displayed row order” means the randomized order when responseRowsRandom is set, and the trial-file order otherwise.
  • Row labels containing underscores are attributed correctly: the whole label is matched, not split on _.
  • responseType: radio gives a matrix of radio buttons and checkboxes a matrix of checkboxes; dropdown, slider, box, comment, likert, rank and stars give one question per row inside a panel.
  • responseOptions: becomes the matrix columns, or the choices/scale of each repeated question.
  • responseRowsRandom: shuffles the row order shown to the participant. The saved response string follows that displayed order, and responseRows_actual records it, so the values can be mapped back to their labels.
  • responseOther: has no effect on radio/checkboxes with rows; with dropdown plus rows, each per-row dropdown gets its own Other item.
  • required: applies to every row. With required=1 each matrix row must be answered before the survey can be submitted; without it, individual rows can be skipped and save as NA in their own position.
  • stimuli (stim1…): with images the whole block of rows repeats for each stimulus, and responses come back as row_row|row_row (rows _-joined within a stimulus, stimuli |-joined).
  • key scoring: with rows, the expected answer is compared against the joined position codes of all rows.
  • Test-trial sliders: the number of rows also drives the check that every slider was touched, but only when type is exactly test; the slider values are saved ;-joined.
  • JSON forms (the form column set): this column is ignored there.

Matrix (radio) battery:

typeheadresponseTyperesponseOptionsresponseRows
formHow often do you...radioNever;Sometimes;OftenSleep well;Exercise;Eat healthy

One matrix question, 3 rows x 3 columns. A participant whose answers are Sleep well=Often, Exercise=Never, Eat healthy=Sometimes saves response Often_Never_Sometimes and responseCode 3_1_2, no matter which row they clicked first. Skipping the middle row saves e.g. Often_NA_Sometimes / 3_NA_2.

Per-row dropdowns:

typeheadresponseTyperesponseOptionsresponseRows
formRate each productdropdownBad;OK;GoodProduct A;Product B

Two separate dropdown questions titled “Product A” and “Product B” inside one panel; the saved values stay in the Product A, Product B order regardless of which was answered first.

Multi-slider on a test trial:

typestimFormatstim1responseTyperesponseOptionsresponseRows
test.jpgface1slider0_100Happiness;Alertness

Two 0-100 sliders labeled Happiness and Alertness; the saved response is the two values joined with ;.

  • Row labels must be unique. Two identical labels collide, and only one value is saved for both.
  • A single row (responseRows=A) still produces a battery: a 1-row matrix or a 1-question panel, not a plain question.
  • A fully unanswered multi-row question saves no results row at all for that trial, rather than a row of NA values.
  • Variables are substituted on form trials only; a variable written in responseRows on a type=test slider trial is shown as literal text.
  • On test-trial sliders, a trailing ; in the cell is counted as an extra row by the check that all sliders were touched, even though no extra slider is displayed.

responseRows appears in these worked recipes:

  • Matrix question battery: Ask one set of items on a shared rating scale as a single matrix question, with the item order randomised per participant.