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)?
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]
;-)
abracadabraPDF.net