Re: limit selections within Checkbox Group

Home Forum Laying out a Form limit selections within Checkbox Group Re: limit selections within Checkbox Group

#4760

ijobling
Participant

The way you mention is the best way..

there are a number of ways you could do this depending on your selection.

One way perhaps is that on each of the checkbox items ‘changes field data’ or ‘when clicked’ you could have a conditional script.. such that if that item ‘is selected’ it writes a value (1 perhaps) to a hidden field on the form, and then if it is ‘not selected’ (ie the FALSE from the branch) it writes another value (0 perhaps) to that field. then even if the user ‘changes’ their mind, the hidden field for that checkbox item contains 1 or 0

and then you can ‘count’ these 10 hidden fields up and if they exceed your requirements, present a message to the user to resolve before letting them proceed to the rest of the form (this ‘count’ could be on the ‘show next page’ for instance)