Logical operations with checkbox fields
I need to get a form with a list of checkboxes and a general checkbox that should be automatically checked if any of the checkboxes from the list is checked.
I think that the logical operator (check) will be the result of logical OR of the list checks (check1, check2, check3 and check4).
My javascript added to every list checkboxes doesn't work correctly:
this.getField("check").value = ((this.getField("check1").value) || (this.getField("check2").value) || (this.getField("check3").value) || (this.getField("check4").value));
Could anyone help me to write this simple script?
