Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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");
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now