Skip to content

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.

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":[]}]}.

ValueEffect
empty cellNo JSON form. A type=form row falls through to the row-based form builder.
<filename> present and valid JSON in the stimuli folderRenders that SurveyJS form.
<filename> missing from the stimuli folder, or invalid JSONThe 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.

  • 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 form header 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.
  • type: the column only does anything when the row’s type is form. 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 the label column of each result row, even when the trial file has no label header.
  • Scoring: independent of the key column. A question scores 1/0 via SurveyJS’s own correctAnswer mechanism (all-or-nothing); questions without a correctAnswer record no correctness score.
  • pageBreak: grouping of consecutive type=form rows onto one screen belongs to the row-based path. A JSON form renders its own pages from the JSON; pageBreak is 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=form rows with an empty pageBreak are excluded from the progress count; this depends on type and pageBreak, not on form.
  • 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).
  1. The canonical form project trial file:
typeform
formform.json
  1. Two different JSON forms in one experiment, mixed with a word trial (intake.json and followup.json must both exist as valid JSON in the project’s stimuli folder):
typeformstim1keyboard
formintake.json
testappley n
formfollowup.json
  1. Fallback contrast: the first row renders form.json via SurveyJS; the second row leaves form empty so it is built from the row-based survey columns instead:
typeformheadresponseTyperesponseOptions
formform.json
formHow old are you?box
  • The filename lookup is exact and case-sensitive; the column header form is case-insensitive like all column names.
  • Wildcards and variables in the form cell can never resolve to a file; write the literal filename.
  • No SurveyJS thank-you screen appears after the form; the experiment immediately advances.