Skip to main content
Participant
August 26, 2020
Question

How to make a set of check boxes required so that at least one has to be selected?

  • August 26, 2020
  • 2 replies
  • 499 views

Is there a way to make a group of check boxes required so that the user has to check one or more in order to complete the form? My specific need is for a Release of Information document. I want them to select which type of records they're giving us permission to access and there are four options. I want them to select at least one before they can submit the form.

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
August 26, 2020

This can be achieved using a script. You will either need to use the script to validate all the required fields in the file before continuing to submit it, or you could be a bit tricky and create a hidden text field to copy the value of the check-boxes group. If you set it as required and its default value as "Off" then it will fail the validation when no check-box is ticked.

The calculation script for it is simple:

event.value = this.getField("CheckBoxGroup").valueAsString;

(replace "CheckBoxGroup" with the actual name, of course)

ls_rbls
Community Expert
Community Expert
August 26, 2020

Yes, you may need to emlpoy some javascripting.