6
Using Acrobat JavaScript in Forms
Forms Essentials
Format Options
Format options applicable to form fields are applied to appearance, validation of data, and
calculation of results, and differ according to field type. The
field
class contains many
properties that may be used to set the format of a given form field. The most basic property
of every form field is its
name
, which provides the reference necessary for subsequent
access and modification.
General formatting options that apply to all form fields include the display rectangle,
border style, border line thickness, stroke color, orientation, background color, and tooltip.
In addition, you can choose whether it should be read only, have the ability to scroll, and be
visible on screen or in print.
There are also specific settings you can apply to text characteristics, button and icon size
and position relationships, button appearance when pushed, check box and radio button
glyph appearance, and the number and selection options for combo box and list box items.
All formatting options are listed and described below in
Table 6.2.
T
ABLE
6.2
Format Options
Format
display
rectangle
border style
stroke color
border
thickness
orientation
background
color
tooltip
read only
scrolling
display
Description
position and size of field on
page
rectangle border appearance
applied to edge of surrounding
rectangle
width of the edge of the
surrounding rectangle
rotation of field in 90-degree
increments
background color of field (gray,
transparent, RGB, or CMYK)
short description of field that
appears on mouse-over
whether the user may change
the field contents
whether text fields may scroll
visible or hidden on screen or in
print
Field Properties
rect
borderStyle
strokeColor
lineWidth
rotation
fillColor
userName
readonly
doNotScroll
display
92
Acrobat JavaScript Scripting Guide