responseType
Experiments Surveys & forms In surveys it picks the question widget (radio, likert, dropdown...); on experiment trials it activates a different widget set (labels, mic, clicks, box, slider, sort).
Selects a non-default response widget or interaction for a trial. Use it when a keypress or a button is not the response you want: a slider, input boxes, clicks on the stimuli, a sortable list, a microphone recording, or any of the survey question types on form trials.
It is used in two distinct ways:
- Test/practice (non-form) trials: the value chooses the response widget presented with the stimuli.
- Form trials (
type=form): the value chooses the survey question type.
Left blank (and with no keyboard or button1), the trial falls back to the default: click-to-respond if it has multiple stimuli, otherwise an input box. Word trials with several stimuli and no keyboard, button or responseType are also presented and styled as click trials.
If no responseType widget fits the interaction (drag-and-drop, games, free drawing, multi-step in-trial logic, external web apps), the escape hatch is a custom HTML trial: stimFormat: html plus an uploaded HTML app that saves via parent.testableSDK.saveHtmlTrialResponse. See the “Custom HTML trials” section on the stimFormat page for the full in-app API and its trade-offs.
Syntax
Section titled “Syntax”Put one value in the cell, spelled exactly as in the tables below, for example slider.
One extension form exists: box*N (for example box*3) gives N input boxes on the same trial.
Options
Section titled “Options”Values accepted on test/practice trials (matched exactly, case-sensitive):
| Value | Effect |
|---|---|
| left blank | Default responses (clicks for multi-stim, input box otherwise) |
label | Drag response labels onto stimuli |
mic | Microphone recording |
clicks | Click on stimuli to respond |
box | Single text input box |
box*N | N text input boxes |
comment | Multi-line textarea |
drag | Stimuli become draggable; positions recorded |
slider | Slider response |
sort | Sortable-list response; available on image-stimulus trials only |
Values accepted on form trials:
| Value | Question shown |
|---|---|
box | text input |
checkboxes | checkbox (matrix with responseRows) |
likert | rating buttons sized to number of responseOptions |
dropdown | dropdown |
stars | 5-star rating |
rank | ranking |
radio | radio buttons (matrix with responseRows) |
slider | slider |
comment | textarea |
anything else (including a blank cell and date) | display-only text, no input |
Defaults & missing values
Section titled “Defaults & missing values”With no responseType column, or with the cell left blank, a test or practice trial uses the default response mode (clicks when it has several stimuli, otherwise an input box), and a form trial shows display-only text with nothing to answer.
Values are never lowercased for you: Slider or Box match nothing, and silently give you no response widget on a test trial and a display-only element on a form trial.
Works with
Section titled “Works with”keyboard: on test trials keyboard responses are disabled whenresponseTypeisslider,boxorcomment; the other types can be combined with keyboard responses.button1-6: buttons can coexist; withresponseType=clicksplus buttons, the participant selects a stimulus by clicking and confirms with a button press.responseOptions: read differently for each response type, with dedicated settings forclicksandmic; forbox/commentit also carries widget attributes such assize,placeholder,maxLengthandenter.required: see therequiredpage. On test trials any value there hides the automatic “Next” button forslideruntil the slider is touched, forces everybox/box*Ninput to be filled in before submitting, and carries thelabels:N;stim:Ngrammar forlabel. It has no effect ondrag, where the save button is controlled by themin/maxmultiple-response settings inresponseOptionsinstead.responseRows: on form trials turnscheckboxes/radiointo a matrix and wraps other types in a per-row panel.- When a response window times out, whatever the participant had already entered is saved as a partial response, in the form that fits the response type. On
mictrials the recording is finished first and the partial response is saved with it. micused anywhere in theresponseTypecolumn turns on microphone setup for the whole experiment, and a skip timer never ends amictrial on its own. While a recording is live, a key or button press does not end the trial immediately: the recording is finished first and the trial is then completed with that press as the response.- Word trials with more than one stimulus and no
keyboard,button1orresponseTypeare treated asclicks; long-word stimuli only get click styling whenresponseTypeisclicks. sortalso moves the buttons below the sortable list.
Examples
Section titled “Examples”Test trial with three input boxes whose values are saved semicolon-joined:
| type | stimFormat | stim1 | responseType | responsePos |
|---|---|---|---|---|
| test | .jpg | face | box*3 | below |
type,stimFormat,stim1,responseType,responsePos test,.jpg,face,box*3,below
Form trial with a likert question:
| type | head | responseType | responseOptions | required |
|---|---|---|---|---|
| form | How satisfied are you? | likert | Not at all;Somewhat;Very | 1 |
type,head,responseType,responseOptions,required form,How satisfied are you?,likert,Not at all;Somewhat;Very,1
Test trial with a slider that must be touched before advancing:
| type | stimFormat | stim1 | responseType | responseOptions | required |
|---|---|---|---|---|---|
| test | .png | image1 | slider | min:0;max:100 | 1 |
type,stimFormat,stim1,responseType,responseOptions,required test,.png,image1,slider,min:0;max:100,1
Tips & gotchas
Section titled “Tips & gotchas”box*Nis the only value that accepts the*Nextension.dateis not available. On a form trial it renders as display-only text, like any unrecognized value.sortonly works on trials with image stimuli, because the sortable list is built from the stimuli themselves.
Common combinations
Section titled “Common combinations”responseType appears in these worked recipes:
- Label choice task: Let participants assign on-screen text labels to images by drag and drop, requiring a minimum amount of labelling before they can continue.
- Likert block in random order: Present a block of likert questions in a fresh random order per participant, with the answer options in a fixed order.
- Slider rating trial: Rate each stimulus on a configurable slider scale inside an experiment trial.
- Type the answer: Collect a free-typed answer in an input box on a test trial and score it against the expected text.
- Voice-recorded picture naming: Collect spoken picture-naming responses, saving an audio recording and the voice onset for every trial.