Forms and Surveys
Surveys & forms
Testable can host full questionnaires alongside experimental trials. Survey rows use type = form and a set of columns that control the question text, response type, and layout.
Anatomy of a form row
Section titled “Anatomy of a form row”| Column | Purpose |
|---|---|
type | Set to form |
head | Question title |
body | Sub-text or additional context, rendered as smaller text under the title |
responseType | How the participant answers |
responseOptions | Available answer choices |
Question types
Section titled “Question types”The responseType column picks the question widget (box, comment, radio, likert, checkboxes, dropdown, slider, stars, rank), and responseOptions supplies the answer choices. Every question type, plus answer options, matrices (responseRows), option randomisation, “Other” options, and required answers, is covered in Survey Response Types.
Pages and layout
Section titled “Pages and layout”Consecutive form rows are gathered onto one survey page. A page always ends when the next trial is not a form; within a run of form rows, these columns control the layout:
| Column | Effect |
|---|---|
pageBreak | 1 (or after) ends the page after this row; before ends it after the previous form row |
pageName | Sets the heading of the page this row belongs to |
separator | Any non-empty value draws a horizontal divider line after this question |
type,head,responseType,responseOptions,pageBreakform,Q1,radio,Yes;No,form,Q2,radio,Yes;No,form,Q3,radio,Yes;No,1form,Q4,box,,form,Q5,box,,Q1 to Q3 render on page 1 (break after Q3); Q4 and Q5 render on page 2 (the page ends because no form row follows).
A few things to keep in mind:
- With
pageBreak, any unrecognised value (including0) is treated asafter, so leave the cell blank to mean “no break”. - Questions generated from a dynamic list all come from one spreadsheet row; use
pageBreak = afterAllto break after the last generated question. - Each page has a single forward button, and there is no back navigation between survey pages. By default the button reads NEXT, or FINISH on the last page; a
button1value on the last row of the page overrides the label.
See the pageBreak column page for the full token list and its interactions with randomisation and timers.
Displaying images in surveys
Section titled “Displaying images in surveys”Use the stim / stim2 / stim3 columns exactly as in experimental trials to show images or other media alongside a question.
Scoring survey responses
Section titled “Scoring survey responses”Add a score column to assign a numeric value to each response option:
score = 1;2;3;4;5Values are semicolon-separated and mapped to responseOptions in order. The total score across all form trials is computed and available in results.
Multiple scores
Section titled “Multiple scores”Prefix scores with a letter label for multiple independent score dimensions:
score = A:1;2;3; B:3;2;1Next steps
Section titled “Next steps”- Survey Response Types: every question type and its answer options
- Generating Questions from Lists: populate options or questions from a list
- Using Variables: embed dynamic content in question text
- How to Read the Results Files: find survey responses in your data