Skip to main content
Participant
February 4, 2025
Answered

Interactive button to show and hide layers

  • February 4, 2025
  • 2 replies
  • 1833 views

Hello! I am hoping someone can help me please with interactive buttons!

 

I have created a map that has different layers for each service we have in that area  - all created in Indesign. The final aim is to have an interactive PDF. 

 

I wanted the user to be able to click a button in a key to show a layer/ particular service and unclick it to turn it off if needed. 

 

How do I do this? I have tried creating buttons but can't see an easy way to show layers as an action?

Correct answer Jeffrey_Smith

There is a workaround method that uses two buttons (placed over top of each other).

1. first button shows the map, shows the hide button, hides itself.

2. then the second button hides the map, shows the first button, hides itself.

Files are attached to demonstrate

2 replies

Robert at ID-Tasker
Legend
February 5, 2025

It's be possible - but would require injecting JavaScript in Acrobat. 

 

TᴀW
Legend
February 4, 2025

It should be possible. You need to create a button in InDesign, then add an action ("Show/hide buttons and forms"), and you get this:

 

Visit www.id-extras.com for powerful InDesign scripts that save hours of work — automation, batch tools, and workflow boosters for serious designers.
Participant
February 4, 2025

Thank you - so I created a box and made it a check box button, you can click it and it will show the layers but do you know how I get it to hide them again when the box/button is unclicked?

Jeffrey_SmithCommunity ExpertCorrect answer
Community Expert
February 5, 2025

There is a workaround method that uses two buttons (placed over top of each other).

1. first button shows the map, shows the hide button, hides itself.

2. then the second button hides the map, shows the first button, hides itself.

Files are attached to demonstrate