3 Replies Latest reply on Dec 1, 2017 2:34 PM by Thom Parker

    ListBox item selection to show/hide (several) other form fields

    gamzes93533812 Level 1

      Salut!

       

      I am preparing a form in Acrobat. I have a listbox (e.g., ListBox1) with 10 items (e.g., item1, item2, item3). I would like to show/hide other form fields (that I already created) dynamically according to users selection from the listbox.

       

      For example, if user selects "item1" from ListBox1, I will display only form field#1 or if user selects item2 from ListBox1, I will display only form field#2, and so on...

       

      I will be really looking forward for any suggestions/corrections.

       

      ------

      PS. I used the following amongst others for my ListBox1:

       

      if(event.value !="item1") {

      this.getField("field1").display = display.visible;

      this.getField("field2").display = display.hidden;

      }

      else if (event.value !="item2")

      {

      this.getField("field1").display = display.hidden;

      this.getField("field2").display = display.visible;

      }

      else if.....