Skip to main content
Participant
January 27, 2017
Question

Dropdown box opportunities

  • January 27, 2017
  • 1 reply
  • 676 views

Hello,

How can I make such combo box(drop down box), if user selects one item from a  combo box and then one or more special fields appears? I am using Adobe Acrobat XI Standard.

Thank you!

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
January 27, 2017

You can use something like this as the dropdown field's custom validation script:

if (event.value=="Item 1") {

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

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

} else {

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

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

}

Participant
February 6, 2017

Thank you, it was helpful.

Now I have another issue regarding the same dorpdown box.

Is it possible to make it like this:

1)if I select from one box "Item1" then another box "Text1" is visible BUT not fillable and with filled text and "Text2" is visible and fillable

2)if I select from one box "Item2", box "Text1" and "Text2" are invisible.

I am using Adobe Acrobat XI Standard.

Thank you!

gauravs43202023
Adobe Employee
Adobe Employee
February 6, 2017

Try this :

if(event.value == "Item1"){

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

  this.getField("Text1").readonly = true;
  this.getField("Text2").display = display.visible;

} else if(event.value == "Item2"){
   this.getField("Text1").display = display.hidden;
   this.getField("Text2").display = display.hidden;
}