form
Surveys & forms
Selects a SurveyJS JSON form definition file for a trial row whose type is form. When the value names a JSON file that exists in the project’s stimuli folder, that whole SurveyJS form (potentially multi-page, as defined inside the JSON) is rendered for this single spreadsheet row, instead of building a form from the row-based survey columns (head, body, responseType…).
This is the column behind “Form projects”: the project editor writes the form definition to stimuli/form.json, and a newly created form project gets exactly this trial file: type,form header with one row form,form.json.
A type of form with a valid filename in this column renders the JSON form; otherwise the row is built from the row-based survey columns.
Syntax
Section titled “Syntax”Put the filename of a JSON form definition from your stimuli folder in the cell, e.g. form.json, on a row whose type is form.
- The value is a single filename with extension, matched exactly (and case-sensitively) against the files in the project’s stimuli folder.
- The file must exist and contain valid JSON; otherwise the value is silently skipped and the row falls back to the row-based form builder.
- The column header itself is case-insensitive, like all column names.
The JSON content is a SurveyJS survey model definition; a minimal one is {"pages":[{"name":"page1","elements":[]}]}.
Options
Section titled “Options”| Value | Effect |
|---|---|
| empty cell | No JSON form. A type=form row falls through to the row-based form builder. |
<filename> present and valid JSON in the stimuli folder | Renders that SurveyJS form. |
<filename> missing from the stimuli folder, or invalid JSON | The row silently falls back to the row-based form builder. No error is surfaced. |
There is no parsing of the cell value beyond the exact-match lookup: no lists, no options, no variable replacement.
Defaults & missing values
Section titled “Defaults & missing values”- When the column is absent or the cell is left empty, no JSON form is used: the row is built from the row-based survey columns instead.
- A
formheader in the CSV counts as a standard column (not a custom/unused column), and when the column is present in the trial file its cell value is echoed into each result row.
Works with
Section titled “Works with”type: the column only does anything when the row’stypeisform. On any other type the value is inert.label: a JSON form writes one result row per answered question and stores the question name in thelabelcolumn of each result row, even when the trial file has nolabelheader.- Scoring: independent of the
keycolumn. A question scores1/0via SurveyJS’s owncorrectAnswermechanism (all-or-nothing); questions without acorrectAnswerrecord no correctness score. pageBreak: grouping of consecutivetype=formrows onto one screen belongs to the row-based path. A JSON form renders its own pages from the JSON;pageBreakis ignored for it.button1: sets the finish-button text only in the row-based path; it is ignored for JSON forms.- Progress bar: consecutive
type=formrows with an emptypageBreakare excluded from the progress count; this depends ontypeandpageBreak, not onform. - Response recording: per question, multi-answer responses are joined with
;and other structured answers are stored as JSON text; scalar answers are stored as-is. The recorded RT and timestamp are identical for every question of the form (one whole-form RT).
Examples
Section titled “Examples”- The canonical form project trial file:
| type | form |
|---|---|
| form | form.json |
type,form form,form.json
- Two different JSON forms in one experiment, mixed with a word trial (
intake.jsonandfollowup.jsonmust both exist as valid JSON in the project’s stimuli folder):
| type | form | stim1 | keyboard |
|---|---|---|---|
| form | intake.json | ||
| test | apple | y n | |
| form | followup.json |
type,form,stim1,keyboard form,intake.json,, test,,apple,y n form,followup.json,,
- Fallback contrast: the first row renders
form.jsonvia SurveyJS; the second row leavesformempty so it is built from the row-based survey columns instead:
| type | form | head | responseType | responseOptions |
|---|---|---|---|---|
| form | form.json | |||
| form | How old are you? | box |
type,form,head,responseType,responseOptions form,form.json,,, form,,How old are you?,box,
Tips & gotchas
Section titled “Tips & gotchas”- The filename lookup is exact and case-sensitive; the column header
formis case-insensitive like all column names. - Wildcards and variables in the
formcell can never resolve to a file; write the literal filename. - No SurveyJS thank-you screen appears after the form; the experiment immediately advances.