Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Acrobat Form - Combox select value and show a layer

New Here ,
Jun 09, 2016 Jun 09, 2016

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.

TOPICS
Acrobat SDK and JavaScript
239
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 09, 2016 Jun 09, 2016
LATEST

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");    

}  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines