These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Changing Text Field Color when filled in

CynthiaD
Registered: May 19 2007
Posts: 8

I have a text field overlayed on a set of lines on a form. I would like to put a format script in the field, which evaluates if there are any
contents, and if there are, sets the fillColor to white(thus hiding the lines), and if there are no contents, sets the fillColor to transparent (thus showing the lines).

It seems that this should be simple enough, but I don't have much experience with scripting. Thanks for the help!

tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
You can accomplish the task using Acrobat JavaScript. You'll need to refer to the Acrobat JavaScript Scripting Reference for writing the script.

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.