Hi Jeremy,
I would like to print text, depending on the selection that participants made in a Dropdown menu in the previous trial. I’ve written this code:
Sequence( "intro", "check")
newTrial("intro",
newDropDown("hand", "...")
.add("left", "right")
.print()
.log()
.wait()
,
newVar("handedness")
.global()
.set(getDropDown("hand"))
,
newButton("Next")
.print()
.wait()
)
newTrial("check",
newText(getVar("handedness").test.is("left")?"Option1":"Option2")
.print()
,
newText(getVar("handedness").test.is("left")?"Option3":"Option4")
.print()
,
newButton("Next")
.print()
.wait()
)
What I would like is the following:
– When participants select ‘left’, they see ‘Option1 Option3’ after they click on the button.
– When participants select ‘right’, they see ‘Option2 Option4’ after they click on the button.
However, the code always prints ‘Option1 Option3’, regardless of which option from the DropDown menu is selected.
Could you help with that?
Andreas