Validating Custom Item Required Responses
[I][edited from support email][/I]
I have a question about how we can go about requiring a response on a custom items with multiple radio buttons. We have two forms of this nature, each with multiple radio buttons. In the first form, MediaLab will continue returning to the form if at least one item is not checked. What we would like is for MediaLab to display an error message indicating that the form is required, not simply loop back to the form without any correcting feedback.
In the second form, subjects could continue without selecting any radio buttons and it will move on to the next form. I'd like to make the form required in some way, even if it's only for a single radio button on the form.
Any advice on how to accomplish this?
Sample Requiring Responses
[I][edited from followup support email][/I]
I have a validation script for the radio buttons working now. The only issue I find with it is that it displays an alert for each item [I]<note from moderator: see fix below>[/I], which would be fine if the prompts were item specific but that isn't the case. Nonetheless, we don't anticipate people skipping the entire questionnaire, so it isn't an issue and it is working as designed.
Attached you can find our sample files for future reference and use.
[I]<attachment revised and reposted, see below>[/I]
Require at least one response but not necessarily all
Note in response to the orginal post (see above), one could change the syntax in this custom item to require that just [I]one or more[/I] questions be answered (as opposed to all). I didn't test it, but you should be able to simply replace all the instances of [I]"||"[/I] (meaning [I]or[/I]) with [I]"&&"[/I] (meaning [I]and[/I]). This would then generate the feedback message only if [I]no questions were answered[/I].