Adobe acrobat forms javascript object specification User Manual

Page of 64
Acrobat Forms - JavaScript Object Specification
44
This property sets or gets the required characteristic of a field. If a field is required its value
must be non-null when the user clicks a submit button that causes the value of the field to be
posted. If the field value is null, the user receives a warning message and the submit does not
occur.
var f = this.getField("MyField");
f.required = true;
strokeColor
Type: Array
Fields: All
Access: R/W
This property specifies the stroke color for a field which is used to stroke the field’s rectangle
with a line as large as the line width. Values are defined by using transparent, gray, RGB or
CMYK color. Refer to the
section for information on defining color arrays and how
values are used with this property.
In older versions of this specification, this property was
borderColor
. The use of
borderColor
is
now discouraged but for backwards compatibility is still valid.
style
Type: String
Fields: Checkbox, Radio Button
Access: R/W
This property allows the user to set the style of a check box or a radio button, that is, sets the
glyph used to indicate that the check box or radio button has been selected. Valid styles
include check, cross, diamond, circle, star, and square. The following defines the style
properties and the associated keywords:
The following example illustrates the use if this property and the style object:
var f = this.getField("MyCheckbox");
f.style = style.ci;
Style
Keyword
check
style.ch
cross
style.cr
diamond
style.di
circle
style.ci
star
style.st
square
style.sq