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

Changing Fill Color of Text Field based on contents

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!

My Product Information:
Acrobat Pro 6.0.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Is this a LiveCycle Form or a traditional Acrobat form? It's different for each.

Here's an article on colors in traditional Acrobat Forms.

[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/using_colors/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/using_colors/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script