Skip to main content
Cheena12
Inspiring
April 25, 2018
Question

Display layer if 2 of 3 field options are selected

  • April 25, 2018
  • 2 replies
  • 369 views

Apologies in advance...newbie here...

I am creating a form where I would like for the following to occur:

  • The field is "Position Type" and has three options: Permanent, Temporary, Variable

(I have not yet decided if I want radio buttons or a dropdown; only one selection can be made)

  • If Temporary or Variable are selected, I would like to display text next to the field.
  • If Permanent is selection, nothing should happen.

I created the layer that has the jpg of the text I want displayed and positioned it.

I've searched around the forums, web and youtube for some script that I could adapt but haven't found anything.

If you someone could guide me to a resource that could assist, I would be deeply grateful!

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
April 26, 2018

Here is an article on hiding and showing OCG layers:

https://acrobatusers.com/tutorials/create_use_layers

However, I have to agree with try67, a much better approach is to use a form field.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
April 26, 2018

Instead of a layer I recommend you use a button field, with the JPG image as its icon. It's much easier to control the visibility of a field than of a layer, especially when the file is opened.