Rendering forms based on fragments
The Forms service can render forms that are based on fragments
that you create using Designer. A fragment is a reusable
part of a form and is saved as a separate XDP file that can be inserted
into multiple form designs. For example, a fragment can include
an address block or legal text.
Using fragments simplifies and speeds the creation and maintenance
of large numbers of forms. When creating a form, insert a reference
to the required fragment and the fragment appears in the form. The
fragment reference contains a subform that points to the physical
XDP file. For information about creating fragments, see Designer Help
A fragment can include several subforms that are wrapped in a
choice subform set. Choice subform sets control the display
of subforms based on the flow of data from a data connection. Use
conditional statements to determine which subform from within the
set appears in the delivered form. For example, each subform in a
set can include information for a particular geographic location.
Also, the subform that is displayed can be determined based on the
location of the user.
or values that are stored separately from any particular object,
such as a date parser or a web service invocation. These fragments
include a single script object that appears as a child of variables
in the Hierarchy palette in Designer. Fragments cannot be created from
scripts that are properties of other objects, such as event scripts
like validate, calculate, or initialize.
Here are advantages of using fragments:
- Content reuse:
- You can use fragments to reuse content in multiple form designs.
To use some of the same content in multiple forms, it is faster
and simpler to use a fragment than to copy or re-create the content.
Using fragments also ensures that the frequently used parts of a
form design have consistent content and appearance in all the referencing
- Global updates:
- You can use fragments to make global changes to multiple forms
only once, in one file. You can change the content, script objects,
data bindings, layout, or styles in a fragment. All XDP forms that
reference the fragment will reflect the changes.
a common element across many forms may be an address block that
includes a drop-down list object for the country. To update the
values for the drop-down list object, you must open many forms to
make the changes. If you include the address block in a fragment,
you only need to open one fragment file to make the changes.
update a fragment in a PDF form, resave the form in Designer.
- Shared form creation:
- You can use fragments to share the creation of forms among
several resources. Form developers with expertise in scripting or
other advanced features of Designer can develop and share fragments
that take advantage of scripting and dynamic properties. Form authors
can use the fragments to lay out form designs and to ensure that
all parts of a form have a consistent appearance and functionality
across multiple forms multiple people designed.