I have a form that has several groups named "transType", within these groups are a text field and a group of 3 radio buttons. Each radio button group has the values of Yes, No and Resolved. I have one radio button group at the top that, when clicked, the corresponding buttons on the page are also selected, e.g. I click "No" on the top group, and all the "No" fields below are selected. I am using the action builder to make this happen, but it seems tedious and I will have to do it for each value. Below is the script as it stands now:
form1.#subform[0].transType[0].markAll::change - (JavaScript, client)
if (this.rawValue == "1") {
this.resolveNode("transType[1].exeError").rawValue = "No";
this.resolveNode("transType[2].newEnrol").rawValue = "No";
this.resolveNode("transType[3].enrolReq").rawValue = "No";
this.resolveNode("transType[4].immPinChange").rawValue = "No";
this.resolveNode("transType[5].pinChange").rawValue = "No";
this.resolveNode("transType[6].loanProc").rawValue = "No";
this.resolveNode("transType[7].contribChange").rawValue = "No";
this.resolveNode("transType[8].allocChange").rawValue = "No";
this.resolveNode("transType[9].allocChange403b").rawValue = "No";
this.resolveNode("transType[10].transfTrans").rawValue = "No";
this.resolveNode("transType[11].confEndBal").rawValue = "No";
this.resolveNode("transType[12].confTarAlloc").rawValue = "No";
this.resolveNode("transType[13].loanReq").rawValue = "No";
this.resolveNode("transType[14].withdrawReq").rawValue = "No";
}
Is there a easier script I could write? Maybe an array? I'm a bit of a n00b in JavaScript, but I can limp my way around. TIA!!!