< Day Day Up > |
Conventional HTML forms have a fixed number of controls for entry of a particular component of the form data. HTML forms have no way to dynamically add further form controls in response to user action. In that respect, HTML forms share the limitations of forms expressed on paper. They must provide a fixed number of form controls, which might not be enough for some situations, yet might be excessive for some simpler scenarios. InfoPath provides support for dynamic views by using repeating sections and repeating tables. Repeating SectionsIn the first example in Chapter 1, you saw the use of repeating sections, both in querying a database and in submitting data to a database. When a repeating section is present, a user may add additional sections as necessary to accommodate all the information that needs to be collected. Repeating sections provide added flexibility in a form. For example, if an executive is filling in an expense claim for a particularly complex business trip, the standard six items for daily expenditure might be totally insufficient. With paper forms, the executive might have to fill in two separate forms, staple a supplementary sheet to the main form, or use some similar ad hoc arrangement. With InfoPath, you can simply right-click to add another repeating section ”for instance, an additional claim item to correspond with the reality of the executive's trip. The ability to add items above or below existing items as appropriate means that items can be presented in some logical order. Of course, the design of the database would also need to be flexible to allow for additional expense items to be added. Repeating TablesIn addition to repeating sections, InfoPath also offers a repeating table form control. To learn more about the repeating section form control, see "The Repeating Section Control," p. 73 (Chapter 4). Repeating tables provide similar functionality to repeating sections, but in a visual table metaphor. To learn more about the repeating table form control, see "The Repeating Table Control," p. 74 (Chapter 4). |
< Day Day Up > |