How to get participant number
Hello,
I created an experiment using opensesame and have successfully uploaded on JATOS. It works fine and everything is running smoothly.
However, I was wondering how I can ask participants to input their student ID or display unique participant ID (that JATOS automatically assigns) to the participants so that they can give it to me? I have a survey that I asked the students to fill in previously and I need to be able to match their survey to their experiment.
Thanks in advance!
Comments
Also, I tried using "Form text input" in Opensesame but I cannot use it with JATOS as it is not compatible. So I somehow need t
Hi,
You want to take a look at this post:
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Alternatively, if you clear the possible subject numbers field in the osweb extension in OpenSesame, the subject_nr variable will be assigned by Jatos and will be the Jatos component result ID.
Hello Sebastiaan and Daniel,
Thank you for replies. I tried both Daniel's and Sebastiaan's methods they worked WONDERS. Thank you so much again. I am not familiar with coding or Java script so the example experiment was very helpful for me.
By the way, so sorry for posting the same question on the JATOS forum before. I was not sure which forum to consult so I uploaded on both forums (but I probably shouldn't do that anymore). Thank you again.
Best regards,
So So
This is a few (ahem!!) years late but still in case someone stumbles upon this, this is the solution I used... It's an inline html with a button that when clicked opens a new website with the srubject ID (super useful if you want to open a post-study survey etc). Hope this helps. (since it's an inline html we need the hidden submit button to be clicked otherwise the study will not complete)
<script> function gotosurvey(x) { vars.surveyClicked = x; document.getElementById('submit').click(); window.open("https://www.google.com/?q="+x); } </script> <h2> Thank you </h2> <br/><br/><br/><br/> <p> Thank you for your participation 🙏🙏 🙏. We really appreciate your time and effort. <br/><br/> Your Particpant number is <b> [subject_nr] </b> <br/><br/> Please click on the link below to complete a brief demographic survey. Your participation will not be recorded until you complete the survey. <br/><br/><br/><br/> <input type=button name="finish" value="Go to Survey" onclick="gotosurvey([subject_nr])"> <input type=submit name="submit" id="submit" value="End Experiment" style="display:none">