76
Adobe Acrobat Adobe LiveCycle Designer
Converting Acrobat Forms ContainingJavaScript
Converting Acrobat JavaScript for Use in LiveCycle Designer Forms
Object model differences that affect scripting 10
Object model differences that affect scripting
In addition to the basic architectural differences between Acrobat and LiveCycle Designer form objects,
the table below lists topics that are especially important to consider for forms migration because they are
likely to directly affect scripting.
Many aspects of the above operations can be handled without using scripting because the logic can be set
using the LiveCycle Designer UI. Appendix C, “
LiveCycle Designer UI Form Logic Example
” on page43
shows examples of the type of logic that can be added to a Text field object using the LiveCycle Designer
UI.
Strategy and options
Some scripting conversions will be straightforward, such as when Acrobat JavaScript is the only way to do
a particular task, but other JavaScript may present some choices you’ll have to make as to how to best
implement similar logic in the LiveCycle Designer form.
Ideally, you should convert as much Acrobat JavaScript as possible, and use Acrobat JavaScript only for
those functions that only it can handle.
Other factors which might influence your choices include the available resources (that is, available
programming skills), your design goals, and schedule constraints. For example, if the priority is high
Topic
Acrobat forms
LiveCycle Designer forms
Events
Events can be used to
trigger actions on the
form, page, or field levels.
LiveCycle Designer model for events is similar to that
of Acrobat, but it has more levels and offers more
control. Form events can be used to trigger actions
on the form, subform, page, and field levels.
LiveCycle
Designer
subforms
Not available in Acrobat
forms. Acrobat fields are
static.
LiveCycle Designer subforms allow the form to
expand or contract based on the amount of data that
must be handled, such as for the result of a data
merging process or as a result of entries.
Form submission In Acrobat forms, form
submission is done using
JavaScript.
The LiveCycle Designer UI offers more choices and
control over how submissions are handled in
LiveCycle Designer forms without using scripting.
Data connections In Acrobat forms, most
data connections are
handled using JavaScript.
LiveCycle Designer allows you set up Web Services
Definition Language (WSDL) connections, and bind
that web service to form fields.
Field naming
conventions
In Acrobat, fields with the
same name are considered
the same field and always
share the same value.
In LiveCycle Designer, duplicate field names are
allowed in the XML tree structure, so the fields need
not have the same value for all fields that share the
same name. When converting, field names need to be
checked to make sure scripts behave as planned.
Security
In Acrobat, security related
to signatures is handled by
using JavaScript; security
settings for the PDF file is
set using the Acrobat UI.
You can use LiveCycle Designer to add signature
fields and other security measures, but security is
mainly handled by setting security options in Acrobat
and by using Acrobat JavaScript.