Skip to content

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:

  1. Test/practice (non-form) trials: the value chooses the response widget presented with the stimuli.
  2. 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.

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.

Values accepted on test/practice trials (matched exactly, case-sensitive):

ValueEffect
left blankDefault responses (clicks for multi-stim, input box otherwise)
labelDrag response labels onto stimuli
micMicrophone recording
clicksClick on stimuli to respond
boxSingle text input box
box*NN text input boxes
commentMulti-line textarea
dragStimuli become draggable; positions recorded
sliderSlider response
sortSortable-list response; available on image-stimulus trials only

Values accepted on form trials:

ValueQuestion shown
boxtext input
checkboxescheckbox (matrix with responseRows)
likertrating buttons sized to number of responseOptions
dropdowndropdown
stars5-star rating
rankranking
radioradio buttons (matrix with responseRows)
sliderslider
commenttextarea
anything else (including a blank cell and date)display-only text, no input

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.

  • keyboard: on test trials keyboard responses are disabled when responseType is slider, box or comment; the other types can be combined with keyboard responses.
  • button1-6: buttons can coexist; with responseType = clicks plus buttons, the participant selects a stimulus by clicking and confirms with a button press.
  • responseOptions: read differently for each response type, with dedicated settings for clicks and mic; for box/comment it also carries widget attributes such as size, placeholder, maxLength and enter.
  • required: see the required page. On test trials any value there hides the automatic “Next” button for slider until the slider is touched, forces every box/box*N input to be filled in before submitting, and carries the labels:N;stim:N grammar for label. It has no effect on drag, where the save button is controlled by the min/max multiple-response settings in responseOptions instead.
  • responseRows: on form trials turns checkboxes/radio into 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 mic trials the recording is finished first and the partial response is saved with it.
  • mic used anywhere in the responseType column turns on microphone setup for the whole experiment, and a skip timer never ends a mic trial 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, button1 or responseType are treated as clicks; long-word stimuli only get click styling when responseType is clicks.
  • sort also moves the buttons below the sortable list.

Test trial with three input boxes whose values are saved semicolon-joined:

typestimFormatstim1responseTyperesponsePos
test.jpgfacebox*3below

Form trial with a likert question:

typeheadresponseTyperesponseOptionsrequired
formHow satisfied are you?likertNot at all;Somewhat;Very1

Test trial with a slider that must be touched before advancing:

typestimFormatstim1responseTyperesponseOptionsrequired
test.pngimage1slidermin:0;max:1001
  • box*N is the only value that accepts the *N extension.
  • date is not available. On a form trial it renders as display-only text, like any unrecognized value.
  • sort only works on trials with image stimuli, because the sortable list is built from the stimuli themselves.

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.