javascript - Scripting in Livecycle ES2 -
i have form has several groups named "transtype", within these groups text field , group of 3 radio buttons. each radio button group has values of yes, no , resolved. have 1 radio button group @ top that, when clicked, corresponding buttons on page selected, e.g. click "no" on top group, , "no" fields below selected. using action builder make happen, seems tedious , have each value. below script 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"; }
i posted in adobe forum livecycle, adobe forums useless. there easier script write? maybe array? i'm bit of n00b in javascript, can limp way around. tia!!!
if using data binding, bind yes/no/not resolved same interface field have same value. mean if selected value @ top rest inherit same value.
having used livecycle past couple of years, there quicker ways such adding function sets each of fields value livecycle can bit flakey @ times best above. might use case statement instead of if/elseif it's case of copying same text , changing values. if want send copy of form i'll stick in various options e.g function or case , can see how looks/works.
Comments
Post a Comment