Skip to main content
departamentos76450012
Participant
June 9, 2016
Question

Acrobat Form - Combox select value and show a layer

  • June 9, 2016
  • 1 reply
  • 256 views

Hello,

I'm new in the Acrobat Forms World

I know Java and Javascript language. In my company needs a new form to send by email. Inside this form there are a combobox with tree diferents values and my question is:

Is posible to change a layer of the PDF with select a value? I think that yes... but I don't know do it

Please could you help me to beginning this new project?

Thanks in advance.

This topic has been closed for replies.

1 reply

departamentos76450012
Participant
June 9, 2016

It's working:

var v = this.getField("combobox").value; // replace with actual field name 

var layers = this.getOCGs(0); 

for (var i in layers) {  

    if (layers.name=="layer1")  

        layers.state = (v=="layer1");  

    else if (layers.name=="layer2")  

        layers.state = (v=="layer2");    

}