6
Using Acrobat JavaScript in Forms
Forms Essentials
Defining CGI Export Values
If you are storing the form data in a database and the data is either different from the item
designated by the form field (such as those in combo boxes or list boxes) or the form field is
a radio button or check box (all of which must have different export values), then you will
need to define CGI export values, which represents identifying information about the form
field to the CGI application.
Using Custom JavaScripts in Forms
The most common uses for Acrobat JavaScript in enhancing the interactive behavior of
forms are in formatting, calculating, and validating data. In addition, you may write custom
scripts for different types of mouse actions, as well as database connectivity.
Introduction to XML Forms Architecture (XFA)
The XML Forms Architecture (XFA) is an XML-based architecture which supports the
production of business form documents through the use of templates based on the XML
language. Its features address a variety of workflow needs including dynamic reflow,
dynamic actions based on user interaction or automated server events, headers, footers,
and complex representations of forms capable of large-scale data processing.
XFA can be understood in terms of two major components: templates and content. The
templates define presentation, calculation, and interaction rules, and are based on XML.
Content is the static or dynamic data, stored in the document, that is bound to the
templates.
Dynamic XFA indicates that the content will be defined later after binding to a template.
This also means that the following is possible:
●
●
Form fields may be moved or resized.
Form fields automatically grow or shrink according to the amount of text added or
removed.
As a form field grows, it can span multiple pages.
Repeating subforms may be spawned as needed, and page contents shift accordingly.
Elements on the page are shown or hidden as needed.
●
●
●
To take advantage of the rich forms functionality offered by the XFA plug-in, use Adobe
LiveCycle Designer
®
to create or edit the templates and save your forms in the XML Data
Package format (XDP) or as a PDF document. Use XDP if the data is processed by server
applications, and PDF if the data is processed by Acrobat.
108
Acrobat JavaScript Scripting Guide