6
Using Acrobat JavaScript in Forms
Filling in PDF Forms
JavaScript Methods Not Enabled in XML Forms
The following Acrobat JavaScript
doc
methods are not available from an XML form:
●
●
●
●
●
●
getField
getNthFieldName
addNewField
addField
removeField
setPageTabOrder
ADO Support for Windows
It is now possible to access both individual and multiple records. Forms can be enabled
with ADO support for more direct database interaction.
Forms Migration: Working with Forms Created in Acrobat 6.0 or Earlier
Detecting XML Forms and Earlier Form Types
To determine whether a document is an XML form, invoke the
doc
object’s
dynamicXFAForm
method, which returns a boolean result. Note that an Acrobat form
does not have an
xfa
object.
Filling in PDF Forms
Completing Form Fields
Completing Form Fields Automatically
In many cases, you may wish to assign a character limit to text fields. For example, when
collecting credit card or social security numbers, you may require that the number be split
across several text fields. For example, the social security number 555-55-5555 would
require three text fields of lengths 3, 2, and 4, respectively.
Spell-Checking Text in Forms
You can spell-check text typed in note comments and form fields, but not in the underlying
PDF document.
114
Acrobat JavaScript Scripting Guide