Insert an optional section
You can create an optional section in your form that users can insert and delete. By default, an optional section does not appear in the form until a user inserts it. Optional sections are bound to groups; any control in an optional section must be bound to a field that is part of the optional section's group. Unlike conditional formatting, which can make a section invisible but does not remove it from the data source, an optional section is not part of the data source of the form until a user inserts it.
Insert an optional section (automatically create the data source)
You can have Microsoft Office InfoPath 2003 automatically create the data source when you insert optional sections (as well as other controls). If you do this, InfoPath will create a group in the data source that is bound to the optional section.
- In design mode, place the insertion point where you want to insert the optional section.
- If the Controls task pane is not visible, click More Controls on the Insert menu.
- In the Controls task pane, make sure the Automatically create data source check box is selected.
Note If the check box cannot be selected, the form's design does not allow the data source to be automatically created. You must insert an optional section that is bound to an existing group or to a group that you create.
- Click Optional Section.
- To add controls to the optional section, drag the controls you want from the Controls task pane into the optional section.
Note You should not move a control already in the form into the optional section (unless the control's field is already part of the optional section's group).
- To customize the instructional text your users click to insert the optional section, right-click the Optional Section label below the section, click Section Properties, make sure the Show instructional text check box is selected in the Section Properties dialog box, and type the new instructional text.
- If you want the optional section to appear in the form by default, click Include the section in the form by default, and then select the Allow users to delete the section check box.
Insert an optional section (bind to an existing group)
- In design mode, place the insertion point where you want to insert the optional section.
- If the Data Source task pane is not visible, click Data Source on the View menu.
- In the Data Source task pane, right-click the group you want the optional section to be bound to, and then do one of the following:
- To insert an optional section that contains controls, click Optional Section with Controls on the shortcut menu. The controls will be bound to the fields in the section's group.
- To insert an optional section that does not contain controls, click Optional Section on the shortcut menu.
Note If you do not see Optional Section as a choice on the shortcut menu, make sure that the group does not repeat and that it has a minimum occurrences equal to 0. All groups created using Microsoft Office InfoPath 2003 have a minimum occurrences equal to 0.
- To customize the instructional text your users click to insert the optional section, right-click the Optional Section label below the section, make sure the Show instructional text check box is selected in the Section Properties dialog box, and then type the new instructional text.
- If you want the optional section to appear in the form by default, click Include the section in the form by default, and then select the Allow users to delete the section check box.
- The binding is correct.
- The control may not function as expected because of a potential binding problem. To identify the potential problem, right-click the control, and then click More Details on the shortcut menu.
- The control will not function correctly because of a binding problem. To identify the problem, right-click the control, and then click More Details on the shortcut menu.