1 Reply Latest reply on Aug 12, 2014 1:38 PM by Anoop9178

    if check box then combo box

    4OurLaw

      Hi there,

       

      I have been searching for the answer for this question.

       

      I am trying to write JavaScript for the following situation.  If my check box is selected then the values of combo box 1, combo box 2, and combo box 3, will all read "N/A".  My fields in each combo box is " " "yes" "no" and "N/A"  If someone could help me out with this answer that would be greatly appreciated.

       


      Thank you.

        • 1. Re: if check box then combo box
          Anoop9178 Adobe Employee

          Hi

           

          You need to use following Javascript code in Acrobat form to achieve your requirement.

           

          if((this.getField("CheckBox1").isBoxChecked(0)))

          {

          this.getField("Dropdown1").value = "N/A";

          this.getField("Dropdown2").value = "N/A";

          this.getField("Dropdown3").value = "N/A";

          }

           

           

          if((!this.getField("CheckBox1").isBoxChecked(0)))

          {

          this.getField("Dropdown1").value = " ";

          this.getField("Dropdown2").value = " ";

          this.getField("Dropdown3").value = " ";

          }

           

          Please see attached PDF for reference.

           

          Regards,

          Anoop