Populating a field according to multiple dropdown selections

celisna

15-11-2015

Hello everyone, I currently have a form in which I click on a checkbox and a relevant text appears in a different subform field. The script is as per below: var txt1 = "1" ; var txt2 = "2" ; var txt3 = "3" ; var txt4 = "4" ; var txt5 = "5" ; var txt6 = "6" ; var txt7 = "7" ; var txt8 = "8" ; var txt9 = "9" ; var txt10 = "10" ; var txt11 = "11" ; var txt12 = "12" ; var MaxLänge = Math.max(Math.max(Math.max(Math.max(Math.max(Math.max(Math.max(Math.max(Math.max(Math.max(Math.max(txt1.length, txt2.length), txt3.length), txt4.length), txt5.length), txt6.length), txt7.length), txt8.length), txt9.length), txt10.length), txt11.length), txt12.length) + 2; this.rawValue = ((txt1 + ", ").substr(0, MaxLänge * xfa.resolveNode("SECTION3.SF0.Table9[9].Row1.DD1").rawValue=="No") + (txt2 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE1.Table2.Row4.C2.rawValue) + (txt3 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE1.Table2.Row5.C3.rawValue) + (txt4 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE1.Table2.Row6.C4.rawValue) + (txt5 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE1.Table2.Row7.C5.rawValue) + (txt6 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE1.Table2.Row8.C6.rawValue) + (txt7 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE1.Table2.Row9.C7.rawValue) + (txt8 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE2.Table14.Row1.C8.rawValue) + (txt9 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE3.Table14.Row1.C9.rawValue) + (txt10 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE4.Row12.C10.rawValue) + (txt11 + ", ").substr(0, MaxLänge * SECTION1.SFTABLE4.Row13.C11.rawValue) +  (txt12).substr(0, MaxLänge * SECTION1.SFTABLE4.Row14.C12.rawValue)).replace(/\n$/,""); What I now need is to link the above script to a dropdown box with choice NO. So when a user selects no, TextField5 gets a value of 1. I need the possibility of selecting up to 12 No's. You're help is greatly appreciated. Kr, Nancy

Accepted Solutions (0)

Answers (0)