Display layer if 2 of 3 field options are selected

Explorer ,
Apr 25, 2018

Copy link to clipboard

Copied

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!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

62

Likes

Translate

Translate

Report

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

Display layer if 2 of 3 field options are selected

Explorer ,
Apr 25, 2018

Copy link to clipboard

Copied

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!

TOPICS
Acrobat SDK and JavaScript, Windows

Views

63

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 25, 2018 0
Most Valuable Participant ,
Apr 26, 2018

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 26, 2018 1
Adobe Community Professional ,
Apr 26, 2018

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 26, 2018 1