Adobe acrobat forms javascript object specification 用户手册

下载
页码 64
Acrobat Forms - JavaScript Object Specification
36
Field Object
The Field object represents an Acrobat form field (that is, a field created using the Acrobat
form tool). In the same manner that an author might want to modify an existing field’s
properties like the border color or font, the Field object gives the JavaScript user the ability to
perform the same modifications.
Field Access from JavaScript
Before a field can be accessed, it must be “bound” to a JavaScript variable through a method
provided by the
methods interface. More than one variable may be bound to a field
by modifying the field’s object properties or accessing its methods. This affects all variables
bound to that field.
var f = doc.getField("Total");
This example allows the script to now manipulate the form field Total via the variable “f”.
Field Properties
The following is a chart of field property names used by Acrobat with Javascript and the field
properties that are available:
Field Property
Name
Type
Text
Field
Combo
Box
List
Box
Push
Button
Check
Box
Radio
Button
Signa
ture
Read
Access
Write
Access
String
String
Integer
Integer
String
boolean
Integer
Object
Boolean
Array
Boolean