About subforms

A subform is a section in the form design that provides anchoring, layout, and geometry management for objects. The objects in a subform can be arranged in rows, columns, or some other kind of balanced arrangement.

More than one subform can be used in a form design. Subforms can be placed inside other subforms. This relationship is displayed in the Hierarchy palette.

Subforms are used to organize a form into different sections. They can also be used to create a form that contains sections that automatically expand and shrink to accommodate the data. If you set a subform to grow, the layout of the form changes in response to the amount of data that is merged when the form is rendered. When the data is merged, subforms ensure that objects and their data are positioned consistently relative to each other. Subforms can be used to match the data hierarchy in XML data.

If you are designing a form that has a fixed layout, it is unlikely that you will need to work with more than one subform because the default subform positions the objects automatically.

You can manipulate the properties of a subform in the Subform and Binding tabs of the Object palette. You can define these properties:

  • Give a meaningful name to the subform (recommended)

  • Enable the subform to span page breaks or force it to be rendered on the next page when the data is merged

  • Specify whether to place the subform after the previous subform, in the specified content area, or on a page that is formatted according to the specified master page

  • Specify whether to place the subform in the same content area as the previous or next subform

  • Specify the flow order of merged data after the subform is placed.

  • Define the subform as visible, invisible, or hidden

  • Specify a locale for the subform

  • Specify whether the subform will repeat its objects each time a unique data item is provided for one of its objects

  • If required, create an overflow leader or trailer for a subform that is capable of repeating the rendering of its objects

  • Specify a binding method for controlling how the subform’s objects are mapped to data

All forms contain a root (parent) subform. In the Hierarchy palette, the root subform (form1) is displayed as the top-level node with the default page subform (untitled Subform) appearing as a child node below the root subform.

Designer automatically adds to every page a default subform that covers the whole page, and corresponds in size and position to the default content area on the master page. Any subforms that you subsequently add to the pages are nested in and appear below the default page subform in the Hierarchy palette.

View full size graphic
A.
Root (parent) subform

B.
Default subform

C.
New subform

In the Hierarchy palette, each subform is represented by a node, and the objects wrapped in a subform are displayed under the subform node. The children of the subform do not inherit changes made on the subform level; the properties of each object must be defined individually.

View full size graphic
A.
Renamed subform

B.
Objects in the subform

If you look at the Purchase Order sample, the root subform, form1, is shown as the top-level node with the default page subform, purchaseOrder, appearing below as a child of the root subform. The other subforms used to wrap objects on the page (header, detailHeader, detail, and total) are nested under the page subform. In the Hierarchy palette, each subform is represented by a node, and the objects wrapped in a subform are displayed under each node.

// Ethnio survey code removed