Correct vs Incorrect Button Responses
I'm hoping someone can help me figure out how to create an experiment where a participant is shown a left and a right button containing different words on a screen (e.g., "done" and "ton", respectively).
In order to move onto the next set of words, the participant must click on the correct word (e.g., "done"). If they click on the wrong word (e.g., "ton"), nothing will happen, and they will stay on the same screen.
Here's what I have so far:
I've created two variables containing different lists of words, one list for the words that will appear on the left button (labeled "Left") and one list for the words that will appear on the right button (labeled "Right").
I've also included two variables indicated whether the word on the left or the right is correct. In this case if the word appearing on the left side of the screen is the correct response (e.g., "done"), the variable "LeftCorrect" says "yes" and "RightCorrect" says "no".
Here's what my variable lists look like for reference:
Now, I've been able to render the buttons to look how I want, but I can't figure out how to disable the left or right buttons according to the correct response lists.
The way it's running now, it doesn't matter if a participant clicks on "done" (the correct response) or "ton" (the incorrect response) the screen will move onto the next trial.
I want it so that the experiment only moves onto the next trial if the participant selects the correct button according to the "LeftCorrect" and "RightCorrect" lists. In the case of my example, the experiment would only move forward if the participant selects "done", whereas, nothing would happen if they select "ton".
Here's what the participant would see on the screen.
Here's the code I used to make the experiment in a form base:
set timeout infinite set spacing 1 set rows "1;1;1;1;1" set only_render no set margins "25;25;25;25" set description "" set cols "1;1;1;1;1;1;1;1" set _theme gray widget 1 2 2 1 button center=yes frame=yes text="[Left]" widget 5 2 2 1 button center=yes frame=yes text="[Right]"
What do I need to add to the code or to my experiment to make it so that the screen only moves forward when the participant clicks on the correct word?