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.
Syntax
Section titled “Syntax”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.
Options
Section titled “Options”| Key | Meaning |
|---|---|
timeout | Shown 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 |
correct | Shown when the answer was scored correct and no timeout |
incorrect | Shown 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.
Defaults & missing values
Section titled “Defaults & missing values”- When the column is absent or the cell is left empty, and
feedbackCorrect/feedbackIncorrectare also empty, no feedback screen is shown for that trial and the experiment advances directly. - There is no on/off mode. Values
1or0are not switches; they are treated as bare text and displayed literally as a catch-all message. - The
correct/incorrectoutcomes come from scoring the response against thekeycolumn, so outcome-dependent keys needkeyto be set.
Works with
Section titled “Works with”feedbackCorrect/feedbackIncorrectoverride thecorrect:/incorrect:messages given infeedback.feedbackTimecontrols how the feedback screen ends: auto-advance after a set number of ms, or a NEXT button when left empty. See thefeedbackTimepage.feedbackOptionscontrols centering and same-screen display. See thefeedbackOptionspage.- The
colorcolumn with afeedback:target sets the feedback text color; a plain color value also applies. titlevalues are re-displayed above the feedback text.key: drives thecorrect/incorrectoutcome.
Examples
Section titled “Examples”Correct/incorrect feedback on a keyboard trial (1.5 s, auto-advance):
| type | stimFormat | stim1 | keyboard | key | feedback | feedbackTime |
|---|---|---|---|---|---|---|
| test | .png | word | a b | a | correct: Well done!;incorrect: The correct key was A | 1500 |
type,stimFormat,stim1,keyboard,key,feedback,feedbackTime test,.png,word,a b,a,correct: Well done!;incorrect: The correct key was A,1500
Per-response messages plus timeout, with a NEXT button (feedbackTime left empty):
| type | content | button1 | button2 | responseWindow | feedback | feedbackTime |
|---|---|---|---|---|---|---|
| test | Choose a side | Left | Right | 3000 | 1: You picked Left;2: You picked Right;timeout: Too slow! |
type,content,button1,button2,responseWindow,feedback,feedbackTime test,Choose a side,Left,Right,3000,1: You picked Left;2: You picked Right;timeout: Too slow!,
Unconditional message with variable substitution (catch-all, no colon):
| type | stimFormat | stim1 | keyboard | key | feedback | feedbackTime |
|---|---|---|---|---|---|---|
| test | .png | probe | f j | j | You answered %response% in %rt% ms | 2000 |
type,stimFormat,stim1,keyboard,key,feedback,feedbackTime test,.png,probe,f j,j,You answered %response% in %rt% ms,2000
Tips & gotchas
Section titled “Tips & gotchas”1/0do not toggle feedback on or off; they are displayed literally as messages. Only leaving the cell empty disables feedback (together withfeedbackCorrect/feedbackIncorrectalso 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.
Common combinations
Section titled “Common combinations”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.