I have created a form with page templates that are spawned when a user selects a checkbox on the form. One of the page templates has a list of checkboxes, followed by 'select all' checkbox. When this is checked, all of the checkboxes automatically check. This works fine on the page template, but when the template is spawned, the 'link' between the 'select all' checkbox is broken and no other checkboxes are selected. This is the javascript that I have so far:
if(event.target.isBoxChecked(0))
{// Perform actions when checked
this.getField(“A”).checkThisBox(0,true);
this.getField(“B”).checkThisBox(0,true);
this.getField(“C”).checkThisBox(0,true);
this.getField(“D”).checkThisBox(0,true);
this.getField(“E”).checkThisBox(0,true);
this.getField(“F”).checkThisBox(0,true);
this.getField(“G”).checkThisBox(0,true);
}
else
{// Perform actions when unchecked
this.getField(“A”).checkThisBox(0,false);
this.getField(“B”).checkThisBox(0,false);
this.getField(“C”).checkThisBox(0,false);
this.getField(“D”).checkThisBox(0,false);
this.getField(“E”).checkThisBox(0,false);
this.getField(“F”).checkThisBox(0,false);
this.getField(“G”).checkThisBox(0,false);
}
Aucun commentaire:
Enregistrer un commentaire