samedi 11 avril 2020

What would be the JavaScript for Adobe Acrobat to check ONE checkbox that is dependent on ALL checkboxes (in a selection) being checked

Im looking for a JavaScript for Adobe Acrobat Pro so that a read-only checkbox e.g. Group 1 Complete will become checked when ALL checkboxes (in a selection e.g. Group 1) have been checked.

The following code worked to check and uncheck Group 1 Complete when checking and unchecking the checkbox that this JavaScript ran from.

var CheckBox = event.target.isBoxChecked(0)?value = "Yes":value = "No"; this.getField("Group 1 Complete").value = CheckBox;

  1. How/To what do I need to change event.target.isBoxChecked(0)? to (adding the script to all checkboxes for Group 1) so that Group 1 Complete will only check when ALL checkboxes have been checked?

  2. Do I need to use another format for the conditional statement and/or create a group for the selection of checkboxes before the conditional statement?

  3. How would this be expanded so that for groups following Group 1, e.g. Group 2, Group 3; Group 2 is dependent on ALL checkboxes in Group 2 AND 1, Group 3 dependent on ALL of Groups 3, 2 & 1 being checked, etc.?

No coding experience so detailed explanations and example code would be greatly appreciated, Many thanks




Aucun commentaire:

Enregistrer un commentaire