Page 10 of 22PREVNEXT

Design a form based on an XML schema

The process of putting a control on a form: In the example, the Customer group is dragged from the task pane onto the form; a menu appears when the mouse button is released; the Repeating Section control is selected; the control appears on the form.

The act of putting controls on a new form is a straightforward process: You drag a group or a field from the Data Source task pane onto the form, and then you choose a control from a menu that InfoPath shows you.

You tried this once in the preceding practice, and you chose a control for the Customer group called Repeating Section with Controls. This put controls on the form for every field and group contained within Customer. However, there's a way to be more selective in what you put on the form.

The animation here shows you the same process, but this time, the Repeating Section control is chosen for the Customer group. This puts the section on the form, and from there, you decide which other groups and fields (and, hence, controls) you want to add to the section.

InfoPath assigns controls

Using information about data types from the XML schema, InfoPath automatically assigns certain types of controls to particular fields. For example, when you drag the CustomerID field onto the form, InfoPath automatically turns it into a text box control because the data type for this schema element is text.

Sometimes more than one control is suitable for particular data. When there are several possibilities, InfoPath gives several choices. For example, it identifies groups that can repeat and offers controls accordingly: When you drag the Customer group onto the form, the menu of choices includes repeating control types because this schema element allows repeating controls.

Tip     InfoPath indicates a repeating group or field with a tiny arrow on the folder icon: Small arrow that indicates repeating group

Page 10 of 22PREVNEXT