Skip to main content
Known Participant
June 17, 2021
Question

Check Box that checks all boxes

  • June 17, 2021
  • 1 reply
  • 2024 views

I have a form with a list of check boxes to select from.  Am I able to have a "Check All" box that checks all the boxes below it.   In other words if checkbox a, checkbox b, and checkbox c all apply, can there be another checkbox that checks all three boxes?

This topic has been closed for replies.

1 reply

Bhavna Negi
Adobe Employee
Adobe Employee
June 17, 2021

@anna08690 

 

You can add a custom script as a "Run a JavaScript, Mouse Up event" to the checkbox:

 

Bhavna

anna08690Author
Known Participant
June 17, 2021

Bhavna, thanks for responding.  Would you have any idea where I may be able to find such a script?  Thanks.

try67
Community Expert
Community Expert
June 17, 2021

You can use the following:

 

var fieldNames = ["checkbox a", "checkbox b", "checkbox c"];
for (var i in fieldNames) {
	this.getField(fieldNames[i]).checkThisBox(0, event.target.value!="Off");
}

 

It will both check and un-check the dependent fields.