23 Replies Latest reply on Aug 20, 2018 10:28 PM by jakeg69027156

    Dependent dropdown lists in Acrobat

    Scottbrander Level 1



      I am a first time poster and was looking for help with some scripting in a PDF form I have created.


      I am basically looking to have a second dropdown list dependant on the value of the first but I'm not having any success.


      I have tried the following as a calculation and as a MouseUp Javascript action but to no avail.


      Basically, I'm looking for the following: If a user selects a School/Unit called Registry in dropdown 1, it will populate with 4 or 5 locations in dropdown 2. I need to do this for about 20 units. I think I'll be ok once I get one unit working but I can't get to that stage


      // clear the dropdown displayed value and items
      this.Value = null; 
      // repopulate the items based on the checkboxes 
      if(this.getField("School/Unit").Value == "Registry")
           this.addItem("Location 1");
           this.addItem("Location 2"); 
           this.addItem("Location 3"); 
           this.addItem("Location 4"); 
           this.addItem("Location 5"); 

      Can anybody help me please?


      Many thanks