Select different components for different conditions
Hi, I've created an experiment in JATOS using jsPsych. I'm anticipating that I may need multiple conditions in my study, and was thinking that I would create specific components for Condition 1, Condition 2, etc. and that I would select the appropriate components for a participant before generating their study link and sending it to them.
I've got the components created, but it seems that when I send out a participant link, the components that were selected are not "remembered". If I were to send a participant a link for Condition 1 and then change my component selection (for example, to run someone else in Condition 2), and then the participant opened their link after I made the re-selection, then they would see Condition 2.
Is there a way to have a link preserve the components that were selected at the time the link was sent out?
Or is there a better way that I should be setting up my conditions?
Thanks for any help you can offer,
-Kelly
Comments
Hi Kelly,
Yes, what you described is intended. This way you can change the properties of the study without having to change the link. To do what you want, there are several options. I describe two here:
{ "runComponent2":true, "runComponent3":false }In your jsPsych javascript, you can then access the values of these by going to e.g.
jatos.batchJsonInput.runComponent2, which you can use as the argument for an if statement. (Here's a bit more information http://www.jatos.org/jatos.js-Reference.html#batch-variables)Hope this helps
Elisa