Force "participant" field

URL of experiment: /

Description of the problem: I would like to force my participants to write their name or ID number in the “participant” field right before they start the experiment. Is there a way to do this? I wouldn’t want to allow them to leave it blank and then if they forget to enter it end up with some unnamed experiment results… Thanks!!

Hi There,

This is a good question! whilst I can’t imagine a way to “force” this at the GUI stage, you could check when the experiment starts if this field is blank, and ask participants to type an ID in a textbox component if they did leave it blank.
checkID.psyexp (10.0 KB)

That said, I don’t think this new marker would be reflected in the output.csv filename (but you could save it to the outputfile using thisExp.addData(‘ID’, expInfo[‘participant’]).

An alternative could be to check if the field was blank and show participants a warning message and tell them to reload the experiment?

Good idea though

Try adding a * to the end of the field i.e. participant*

1 Like