psychopy.org | Reference | Downloads | Github

How to make form fields mandatory?

Hello everyone,

I’m pretty new to PsychoPy and Pavlovia but so far I tried to dig through previous forum posts to find my answers. However, I’m still not certain if there’s a way to make specific fields (OR all fields!) mandatory when making a sociodemografic form (locally and online). I know that there was an attribute to check if the form is complete which is not working any more, but I can’t seem figure out if there is an alternative to this, since my coding skills are non-existing and I can’t really understand if this contibution holds the answer to this: add formComplete method (code cleanup) by RebeccaHirst · Pull Request #326 · psychopy/psychojs · GitHub (?)

What I did try so far is to make a form and clickable text beneath it to continue the experiment (end the form routine), which should appear only on condition that the form is complete, but this made the experimant crash locally as well as in Pavlovia.

Any tipps on how to do this? Or do you use combinations of other components instead to collect data on participant, as suggested here: Custom web component for online experiments: Forms, surveys, questionnaires, and other web-based content?

Thanks in advance! M

You can make fields required in my PreQuest forms on the VESPR Study Portal.

e.g. demographics for portal.xlsx (8.9 KB)

Thanks for the quick reply! Not sure what you mean exactly, tho. Which feature on this portal should I use for this?

This option allows you to have a single page of questionnaire in the portal before you reach Pavlovia

Does it also work as a PostQuest - i need my experiment to end with his form?

p.s. since I’m a genuine beginner at PsychoPy, it would have helped if you specified what you mean by PreQuest, since I couldn’t find this anywhere term in your portal. I’m sure you built in loads of useful tools, it’s just that they’re not very accessible for absolut beginners. I assume it’s this: https://moryscarter.com/vespr/formtohtml.php?

Either way - I really appreciate your help (your comments have helped me loads in the past few weeks!). :slight_smile:

PreQuest is an advanced option in my portal that licensed users can access in the portal by pasting from a spreadsheet in the same format as my form to html code, so you can use that to test.

I haven’t yet coded PostQuest but I will do if requested by a licensed user. Since I don’t want to save any participant data on my portal database them PostQuest data would be emailed to the researcher with participant and session values to identify it. Format to be determined in discussion with the first user but probably comma separated.

1 Like