XFA Specification
Chapter 2, Template Features for Designing Static Forms
Form Structural Building Blocks
28
Containers of Fixed Content
Draw
Forms invariably contain fixed content. This content, often referred to as boilerplate, typically provides
context and assistance for consumers of the form. A
draw
element encloses each piece of fixed content. A
user cannot directly interact with a
draw
element. Refer to the diagram
“A simple XFA form” on page 19
for some examples of
draw
elements. Note that call-outs indicate only two of the many draw elements on
the form. Note also that
draw
element content is not limited to text. For example, a
line
legitimate content for a
draw
element.
The following is an example of a
draw
element that will produce the outline of a rectangle with the
dimensions of one-inch square, positioned at an (x,y) coordinate of (0,0):
<draw
x="0" y="0" w="1in" h="1in">
<value>
<rectangle/>
</value>
</draw>
For more information, please see the syntax description of the
draw
Containers That Group Other Container Elements
Template
A
template
is a non-geographical grouping of subforms. The template represents the form design as a
whole, enclosing all of the elements and intelligence of the form.
The following is an example of a
template
element that describes a form comprised of two text fields:
<template>
<subform
name="Device" x="2" y="3">
<field
name="ModelNo" x="0" y="0" w="1in" h="12pt"/>
<field
name="SerialNo" x="0" y="16pt" w="1in" h="12pt"/>
</subform>
</template>
Subform
Common paper forms often contain sections and subsections that are easily distinguished from one
another. For example, there are three distinct sections for header, detail and summary information in
diagram
“A simple XFA form” on page 19.
The form is really a collection of these sections and subsections,
each of which XFA refers to as a subform. One can think of a subform as a sort of interactive
area.
Some of
the features offered by
subform
elements include:
●
Management of scope of element names in scripting operations, as described in
“Scripting Object
Validation of the content of the subform as a whole, as described in
“Validations” on page 299
Hierarchical data binding, as described in
“Basic Data Binding to Produce the XFA Form DOM” on
●
●
The
subform
element ikely provides the level of granularity that a form object library would use. A form
object library is a tool used by form designers to store commonly used groupings of form
container
objects, for example, company letterhead.