Skip to main content
Participant
June 23, 2020
Question

JavaScript change Color by click

  • June 23, 2020
  • 2 replies
  • 625 views

Hello everybody

I have created a button in InDesign and now exported it as a PDF. Now I would like to program the field to change color when I click on it and to show the default color when I click again. Is there a Java code that I can use?

Best regards

 

Like This:

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
June 24, 2020

PDF fields can only be rectangular. If you want to have a non-rectangular form then you need to use an image, preferably as a part of a layer. You can (partially) overlay a field on top of that area that will cause it to toggle on or off.

 

I've developed similar solutions for my clients in the past, and while it's not a simple task, it is doable. If you're interested in hiring someone to do it for you feel free to contact me privately via [try6767 at gmail.com].

Bernd Alheit
Community Expert
Community Expert
June 23, 2020

"Is there a Java code that I can use?"

Acrobat Reader doesn't use Java!