Controlling the placement of objects in forms that have a flowable layout

You can use either of two ways to control how Designer places objects in a form:

Content areas
On the master pages, content areas control the areas and flow direction in which Designer places objects on the pages. Every master page has a default content area.

Subforms control how Designer places objects in the form. By wrapping objects into subforms, you can use the options in the Subform and Binding tabs in the Object palette to regulate how many times objects are rendered and their placement on the page.

Content areas in a flowable layout

All master pages contain a default content area, which is displayed on the associated pages. The content area outlines the area in which you can place objects on the pages, much like the margins in a text document. You cannot place objects on the pages outside the area represented by the content area.

Every form must have at least one content area.

The content area does not delineate or limit the area in which you can position objects on the master pages. In fact, you can place boilerplate objects anywhere on the master pages, inside or outside the content area. If you place objects outside the content area to contain header and footer text, the date and time, or page numbering, test the form to ensure that the objects appear as intended. You want to make sure that objects on the pages do not overlap and hide the objects on the master pages when the form is rendered.

With forms that have sections that adjust to accommodate data, remember that the layout of the form is ultimately data-driven. If the form is being rendered through Forms or Output, the pages are added until all the available data is merged. As new pages are added, data flows from page to page within the area defined by the content area on the master pages.

If you want the same layout for each page in your form, the default content area is all you need. However, if the layout is more involved, you can add additional content areas to the default master page. Keep in mind that if you want different flow direction, page orientations, or two-sided pages, you can insert additional master pages and configure the other master pages and content areas to suit your design.

Remember that you cannot work with content areas on the pages.

Subforms in a flowable layout

Planning subforms is an important part of creating a form with a flowable layout. In a form that contains flowable sections, subforms contain the objects within each section of the form. They maintain the form layout as it adjusts in length according to the amount of data merged into it. Subforms also ensure that the objects move as a unit and are placed consistently relative to each other. When you wrap objects in subforms, you ensure that regardless of the amount of data merged with the form, the format of each section remains consistent, and the layout of the entire form is predictable from one rendering to the next.

You can nest subforms to any depth. By nesting them, you can make the form design match the XML data file that is merged with it. For example, if the XML data file includes two levels, you can create the subform hierarchy by matching the subform names with the tag names in the XML data file so that Designer can map the data without transforming the data file.

A form that has a flowable layout, such as the Purchase Order sample, typically includes various subforms nested together, with one or more objects in each subform. For example, you can see how the various objects in the Purchase Order sample are wrapped in the subforms named header, detailHeader, detail, and total. Notice how you can align text and text field objects into rows and columns and wrap them in a subform. Using subforms to wrap groups of objects such as the various text field objects in the detail subform not only lets you maintain the layout of the objects, but also lets you control how often the subform is repeated.

You can configure each subform so that when the form is rendered, only the subforms that contain the objects that are necessary for representing the data content are placed. For example, you may want to produce different purchase orders for each customer. In one purchase order form, the detail subform is placed 12 times to indicate the items purchased. In another purchase order form, the same subform is placed 50 times, spanning multiple pages.

The sample Purchase Order form illustrates how you can use subforms to achieve this configuration. Open the form in Designer and look at the Hierarchy palette to examine the structure of the subform. Look at the Object palette to see how the subforms are configured. Pay particular attention to the purchaseOrder, detailHeader, and detail subforms and how they are configured. Keep in mind that the parent subform, which is purchaseOrder, controls the flow of content in the form and expands to fit the available data. The detailHeader subform is configured with a minimum count of 1, which means that when the form is rendered, this subform appears only once. However, the detail subform is configured to repeat with each data item and therefore, when the form is rendered, appears as many times as there are occurrences of the data.

You can also use a subform to draw a border around a group of subforms. For example, you can create one or more dynamic subforms, nest those subforms within a wrapper subform, and then specify a border for the wrapper subform. When the form is rendered, a border is drawn around all the internal subforms.

// Ethnio survey code removed