[solved] Questionnaire issues
Hi I am having trouble with some parts of a questionnaire
I want through opensesame to have the following:
if one presses the "next" button without having checked one or more of the available checkboxes to warn the user and not let him/her continue
and on another note
how can i control one of the checkboxes? e.g. if i have 6 checkboxes in a question, the user can select any one the five (one or more) except for one checkbox the 6th one...if that is selected it cannot select any of the others and has to press "next" for the next question....
Thanks ahead of time for the help
Comments
You can find a very useful discussion about about validating form input here:
Essentially, to validate form input, you will need to implement some checks in an
inline_scriptand, if necessary, run the form until your criteria are met. Forms don't have any built-in validation functionality, so -- to answer your second question -- you cannot disallow participants from checking too many checkboxes. However, you can check afterwards whether participants have checked too many checkboxes, and, if so, execute the form again.I cannot say anything more specific, because you would need to provide more details about the implementation of your experiment.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks for your response
So for example in the partial script below (which is modification of your questionnaire demo) I want to NOT allow participants to move to the next question unless at least one checkbox has been clicked...as in the consent form...the code below
Right, so that's what the discussion I linked to above is all about
. See especially this comment:
Check out SigmundAI.eu for our OpenSesame AI assistant!
okay last message i hope...
i did look at the previous messages and played with the sample code but i am still having trouble. So i modified the code for the rating scale for checkbox while maintaining all other code intact but i still have a problem....that is, you can leave the checkbox unchecked and it will still go on to the next trial....what am i missing?
Code below:
Hi,
You're very very close. The problem was that an unchecked checkbox sets its response variable to 'no', and not to 'None'. This explained in more detail here:
So the script below should do the trick. For future reference, you don't need to implement the form in an
inline_script(although you can). You can also implement the form using aform_baseplug-in, and only use aninline_scriptfor the checking part.Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
I created an experiment that runs perfectly on a MacBook Pro (OS X; OpenSesame 0.27.4). However, when I try to open the experiment file on my testing machine - a PC (running OpenSesame 2.8.2) - it gives an error message that reads: Unexpected error: exception message. Exception type: WindowsError
Hi Scarlett,
As a first step, you could upgrade to OpenSesame 2.9.0. However, in case this doesn't resolve the issue: Do you see additional output in the debug window? And/ or do you see a
opensesame.exe.logfile in the OpenSesame folder? If so, please post!Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!