Skip to content

feedback

Experiments

Defines a per-trial feedback screen shown after the participant responds (or times out). The single feedback column carries a small key:value grammar that selects one message depending on the outcome of the trial: the exact response given, correctness, timeout, or a catch-all. Feedback runs only for trials whose type is test or practice; it never fires for learn, forms, or other trial types.

The feedback screen is inserted between the trial’s response and the next trial. While the feedback screen is up, responses are not recorded as trial data; recording resumes when the next trial starts.

Write correct: Well done!;incorrect: Try again in the cell to show a different message depending on whether the answer was scored right or wrong.

The general form is a semicolon-separated list of key: message segments:

key1: message1;key2: message2;bare catch-all text
  • Each segment is split on the first colon only, so messages may themselves contain colons.
  • Keys and messages are trimmed.
  • A segment without a colon becomes the catch-all message, shown when no other key matches.
  • Variables such as %response%, %rt%, %correct%, %responseCode%, indexed/aggregate variants (%rt.avg% etc.), participant details, and user variables are substituted before the cell is interpreted.
  • Messages may contain HTML markup.
KeyMeaning
timeoutShown when the trial timed out
(literal response value)Shown when the recorded response equals this key exactly, and the trial did not time out. The comparison uses the response as it appears in results: a keyboard token like a, a button number like 1
correctShown when the answer was scored correct and no timeout
incorrectShown when the answer was scored incorrect and no timeout
(bare text, no colon)Catch-all; shown when nothing above matched and no timeout

Match priority is strictly top to bottom in the table above. If nothing matches, the feedback screen is skipped and the experiment advances immediately.

  • When the column is absent or the cell is left empty, and feedbackCorrect/feedbackIncorrect are also empty, no feedback screen is shown for that trial and the experiment advances directly.
  • There is no on/off mode. Values 1 or 0 are not switches; they are treated as bare text and displayed literally as a catch-all message.
  • The correct/incorrect outcomes come from scoring the response against the key column, so outcome-dependent keys need key to be set.
  • feedbackCorrect / feedbackIncorrect override the correct: / incorrect: messages given in feedback.
  • feedbackTime controls how the feedback screen ends: auto-advance after a set number of ms, or a NEXT button when left empty. See the feedbackTime page.
  • feedbackOptions controls centering and same-screen display. See the feedbackOptions page.
  • The color column with a feedback: target sets the feedback text color; a plain color value also applies.
  • title values are re-displayed above the feedback text.
  • key: drives the correct/incorrect outcome.

Correct/incorrect feedback on a keyboard trial (1.5 s, auto-advance):

typestimFormatstim1keyboardkeyfeedbackfeedbackTime
test.pngworda bacorrect: Well done!;incorrect: The correct key was A1500

Per-response messages plus timeout, with a NEXT button (feedbackTime left empty):

typecontentbutton1button2responseWindowfeedbackfeedbackTime
testChoose a sideLeftRight30001: You picked Left;2: You picked Right;timeout: Too slow!

Unconditional message with variable substitution (catch-all, no colon):

typestimFormatstim1keyboardkeyfeedbackfeedbackTime
test.pngprobef jjYou answered %response% in %rt% ms2000
  • 1/0 do not toggle feedback on or off; they are displayed literally as messages. Only leaving the cell empty disables feedback (together with feedbackCorrect/feedbackIncorrect also being empty).
  • The catch-all message keeps its leading spaces, unlike keyed messages, and they survive into the displayed HTML.
  • If several bare (colon-free) segments are given, the last one wins.
  • Variables are substituted before the cell is split into segments, so a substituted value containing ; or : changes how the string splits.
  • Responses given while the feedback screen is up are not recorded as trial data.

feedback appears in these worked recipes:

  • Deadline with timeout message: Enforce a response deadline and tell participants when they miss it, without interrupting trials they answer in time.
  • Accuracy feedback block: Score keyboard responses and show correct, incorrect, or timeout feedback after every trial.
  • Practice, then test: Walk participants through instructions and a feedback practice block before the scored test block.