Insert a rich text box InfoPath 2007
Author: mety Labels:: Insert a rich text box InfoPath 2007If you want users to be able to insert formatted text, paragraph breaks, tables, photographs, or clip art in a data-entry field, you can use a rich text box on your Microsoft Office InfoPath form template. Use a rich text box when you want to:
Related controlsInfoPath includes controls that are similar to rich text boxes but that serve different purposes. To decide which of these controls works best on your form template, refer to the following list:Text box Like a rich text box, a text box allows users to type, edit, or view text. Unlike a rich text box, a text box displays only a single line of text by default, and users cannot add formatting elements to a text box, such as bold or italic text, pictures, or tables. Expression box An expression box is generally used to display read-only text, to display the value of another control on the form template, or to create formulas (formula: An XPath expression made up of values, fields or groups, functions, and operators. Formulas can be used to calculate mathematical values, display dates and times, and reference fields.) that are based on XPath (XML Path Language (XPath): A language used to address parts of an XML document. XPath also provides basic facilities for manipulation of strings, numbers, and Booleans.) expressions. Unlike a rich text box, an expression box does not store or save data. Therefore, you should use an expression box only if you don't want to save its value or reference it in another formula. The user experienceLike a text box, a rich text box is simply a placeholder on a form, such as a comments box, in which users enter text. When typing text in a rich text box, users have access to many of the formatting features that they are accustomed to using in other Microsoft Office system documents. For example, users can insert a picture or table in a rich text box or apply yellow highlighting to a particular paragraph of text.To find out if they can format text in a particular field on a form, users place their cursor in the field or select the text in the field. If options on the Formatting toolbar are active instead of dimmed, the users can format the text just as they would in any other Microsoft Office system document. Compatibility considerationsWhen you design a form template in InfoPath, you can choose a specific compatibility mode to design a browser-compatible form template. When a browser-compatible form template is published to a server running InfoPath Forms Services, and then browser-enabled, forms based on the form template can be viewed in a Web browser. When you design a browser-compatible form template, some controls are unavailable in the Controls task pane because they cannot be displayed in a Web browser.Although rich text boxes are available when you design a browser-compatible form template, be aware of the following limitations:
Insert a rich text boxThe procedure for inserting a rich text box differs slightly depending on whether you are designing a new, blank form template or basing the design of your form template on a database or other external data source (data source: The collection of fields and groups that define and store the data for an InfoPath form. Controls in the form are bound to the fields and groups in the data source.).The following illustration shows how a rich text box looks when it is selected in design mode (design mode: The InfoPath design environment in which you can create or modify a form template.). Controls can be bound or unbound. When a control is bound, it is connected to a field or group in the data source so that data entered into the control is saved in the underlying form (.xml) file. When a control is unbound, it is not connected to a field or group, and data entered into the control is not saved. When you select or move your pointer over a control, text and a binding icon appear in the upper-right corner of the control. The text indicates the group or field to which the control is bound in the data source. The icon indicates whether the control is correctly bound to that group or field. When the binding is correct, a green icon appears. If there's something wrong with the binding, you'll see a blue or red icon instead. The data source for the form template consists of fields and groups that appear in a hierarchical view in the Data Source task pane. Rich text boxes are always bound to fields (field: An element or attribute in the data source that can contain data. If the field is an element, it can contain attribute fields. Fields store the data that is entered into controls.). In the following example, the Notes box on the form is bound to the discussionItemNotes field in the Data Source task pane. Insert a rich text box on a new, blank form templateWhen you design a new, blank form template, the Automatically create data source check box in the Controls task pane is selected by default. This enables InfoPath to automatically create fields and groups in the data source as you add controls to the form template. These fields and groups are represented by folder and file icons in the Data Source task pane.
Insert a rich text box on a form template that is based on an existing data sourceIf you base the design of your form template on an existing Extensible Markup Language (XML) file, database, or Web service, InfoPath derives the fields and groups in the Data Source task pane from that existing data source. In this scenario, you can insert a rich text box by dragging a field from the Data Source task pane onto the form template or by inserting a rich text box from the Controls task pane instead, as described in the following procedure:
Layout tipsUse the following tips to help you refine the appearance, size, and other aspects of a rich text box:
|