XFA Specification
Chapter 8, Dynamic Forms
Data Binding for Dynamic Forms
260
Data Binding for Dynamic Forms
As explained in
“Static Forms Versus Dynamic
Forms” on page 259,
dynamic forms are
data-driven To the end user this means that unused
portions of the form are omitted. This makes the
filled form less cluttered and more convenient to
view in a display of finite size. The number of
occurrences can also be limited to a range bounded
by the
max
and
min
properties of the
occur
property. For example, consider the same
membership list described under
“Forms with
Repeated Fields or Subforms” on page 200,
converted to a dynamic form. The
Member
subform
is set to repeat just as many times as the data
requires. The following figure shows the result
when the Form DOM is filled with the same data as
before and printed or displayed. Note that the
detail line is present exactly twice, once for each
supplied detail record. If there had been 17
members there would have been 17 detail lines
and no more.
Anytown Garden Club
2023 Anytown Road
Anytown, USA
Date
01/01/04
Membership List
John
Betty
Brown
White
Dynamic membership form
after merge with data
The membership list example is highly simplified
compared to forms used in business. Consider the requirements for a dynamic purchase order form. This
form must grow to as many detail lines (purchased items) as required by the data. In addition, there must
be fields holding the subtotal, taxes, and the grand total, which must move down the page as the list of
detail lines grows. Also, there must be a subform containing delivery instructions which must only be
included if there are delivery instructions in the data. The following figure shows the result of merging the
template with typical data.