Feature #1501

Making checkbox mandatory not possible

Added by Brecht De Man over 8 years ago. Updated over 8 years ago.

Status:NewStart date:2015-12-18
Priority:LowDue date:
Assignee:Nicholas Jillings% Done:

0%

Category:-
Target version:-

Description

(Kind of a 'bug', but I go on to suggest further features)
The 'mandatory' attribute doesn't seem to do much (see updated example project), i.e. I can choose to not tick anything and still proceed to the next question.
I could see the mandatory option being useful if you need people to give 'at least one and up to N' answers, as opposed to the mandatory radio button (exactly one answer), non-mandatory radio button (0 or 1 answers) and non-mandatory checkbox (0, 1, 2, ... all answers). In this case the user might want to add an 'Other', or 'None of the above' or something option, but I'd say that's up to them.

If it's straightforward enough, this could be expanded to a few more standard checkbox behaviours, like:
- minimum number of boxes ticked (choose at least 3)
- maximum number of boxes ticked (choose up to 3)
- specified number of boxes ticked (choose exactly 3)
- checkbox with text field, e.g. 'Other: ...' - this could be a text box that appears when ticked (I've got an example of that if that would be of use, although I'm sure this is fairly standard) - or not.

History

#1 Updated by Nicholas Jillings over 8 years ago

Should a checkbox ever be mandatory? The select a minimum / maximum would be fairly straightforward to implement, the specified less so (but if minimum == maximum that would work). Like the idea of an 'Other' box, we'd need to specify that as a fixed name: <option name="other">Please Specify</option> Would always generate a text box entry with please specify as the default value. Currently the checkbox output takes the items and reports back using the name as an identifier such as <option name="hwDesign" checked="false"/> so incorporating the other box into this may not be so straight forward.

#2 Updated by Brecht De Man over 8 years ago

Something like 'select at least/most three' seems like fairly basic survey behaviour so if it's not too much hassle I'd like to implement it. I was mainly surprised that I could ignore a checkbox question even if it was 'mandatory'.

Also available in: Atom PDF