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

How do I force all fields on a PDF to be transparent?

KGolba
Registered: Jun 15 2010
Posts: 2

I am using Adobe Acrobat 8 and all of the field's border colors are set to yellow when the form is first opened.

Once text has been entered and the user has tabbed out, the border disappears using a custom format script (SwitchBorder(color.yellow, color.transparent)SwitchBorderStyle(border.s, border.i)

I would like to find out if there something I can add to the form to make all of the borders transparent (to keep some clients happy who like the borderless fields) and keep the custom format script to maintain the border style switch (for users who like to clearly see the input fields)?

My Product Information:
Acrobat Pro 8.0, Windows
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
This script should do what you need after some adjustments (because it switch background color, not border color).


Put this as a document level JavaScript:
[i][color=green]function switchBackground(fieldName)//
{
if (getField(fieldName).fillColor == "T")// if transparent
{
this.getField(fieldName).fillColor = color.yellow;// color = yellow
}



else // otherwise (if not transparent)
{
this.getField(fieldName).fillColor = color.transparent;// color = transparent
}
}
[/i][/color]

Put this into form fields as an "on focus" AND an "on blur" action:
[i][color=green]switchBackground(event.target.name);
[/i][/color]

;-)