Check if form is filled in
Hi,
I am relatively new in OpenSesame(to give a heads-up).
I created a form with rating scales using Inline python code. I wonder how to code a line that looks at whether all the rating scales are actually clicked on and, if not, an error message appears that says that not all answers are filled in. Not sure if that is even possible.
Any help with this would be much appreciated!
Thanks :)
Comments
Hi @Ruya,
You find useful information on this here: https://osdoc.cogsci.nl/3.3/manual/forms/validation/
In that example, you'll see how to implement input validation (for example preventing the OK button to become active if no age data has ben introduced).
Hope this helps,
Fabrice.
Hi Fabrice,
Thank you for your fast reply! I looked at the example, but I did not really trigger an Aha moment for me (sadly still too much of a beginner). Basically, I have 4 rating scales that need a mouse click. I am not sure how to tweak the example in the link to say only if all rating scales have a mouse click will the button to continue become visible.
Maybe I am struggling because I am not sure how to get the correct 'response' information from the rating scale function. As well as indicating if something is selected in the rating scale or not.
Best,
Ruya
Hi @Ruya ,
This (rather old) thread might be of help:
If this doesn't answer your question, could you please upload your script here so that we can have a closer look?
Cheers,
Lotje
Did you like my answer? Feel free to

Hi @lvanderlinden,
Thanks for the reply :). I checked the code you sent me and filled it in, but nothing seemed to happen. I think the issue resides in the fact that I do not know what this part of the code refers to and how I can only refer it to a button on the form_base and tell it to appear based on the responses given to all rating scales.
# Rerun the item (after preparing it):
exp.items['form_base'].prepare()
exp.items['form_base'].run()
I put my experiment in the appendix. Thanks for taking your time to explain the code.
Hi Ruya,
The aforementioned thread was a bit outdated. I attached an example on how to check if all questions are answered in the attached script. Do you think you'll be able to make a similar modification for the MC block?
Cheers,
Lotje
Did you like my answer? Feel free to

Hi Lotje,
Yes, everything works now, and the code is very clear! Thank you so much again for you time explaining :D
Best,
Ruya
Hi @Ruya ,
Ok, great to hear!
Good luck with your research!
Cheers,
Lotje
Did you like my answer? Feel free to
