Ways to customize a rich text box

After you insert a rich text box on a form template, you can customize it by changing its properties and settings in the Rich Text Box Properties dialog box. To open this dialog box, on the form template, double-click the rich text box whose properties you want to change.

The following table describes some of the ways in which you can customize a rich text box and offers reasons why you might do so. Although the table isn't intended to provide detailed procedural information about the options in the Rich Text Box Properties dialog box, it does give you an idea of the range of options that are available.

Notes: 

  • If you are designing a browser-compatible form template, certain features in the Rich Text Box Properties dialog box are not available. For example, you cannot selectively specify rich-text formatting options, such as character formatting or paragraph breaks.

  • If your form template is based on a database, schema, or other existing data source, you may not be able to customize all aspects of a control. For example, you may be able to change the size of the control but not its field or group name, which are derived from the existing data source.

Tab

Task

Details

Data

Change the associated field name

When you design a new, blank form template, you can change the default field or group name for a control to something that is easier to identify when you work with the data source. For example, a field named "MeetingNotes" is easier to understand than a field named "field1."

Note: Changing the field name does not change the binding between a rich text box and field in the data source. If you need to bind a rich text box to a different field, right-click the rich text box, and then click Change Binding on the shortcut menu.

Data

Specify a default value

If you want default text to appear inside a control when a user first opens the form, you can type that text in the Value box. You can also use the value of another field in the data source as the default value for a control. Default values are different from placeholder text (which is described later in this article) in that they are always saved as data in the form (.xml) file.

Data

Add data validation

Click Data Validation to specify data validation rules for the control. For example, if you need part numbers to be entered in a specific format — three numbers, then a dash, and then two more numbers — you can use data validation to ensure that users conform to this pattern.

Display

Enable paragraph breaks

By default, paragraph breaks are enabled for rich text boxes so that users can type paragraphs of information into the rich text box. If you want to prevent users from doing this, clear the Paragraph breaks check box. Enabling paragraph breaks in rich text boxes is not supported in browser-compatible form templates.

Display

Enable character formatting

By default, character formatting is enabled for rich text boxes so that users can format the text that they type into the rich text box. If you want to prevent users from doing this, clear the Character formatting check box. Enabling character formatting in rich text boxes is not supported in browser-compatible form templates.

Display

Enable full rich text

By default, the Full rich text (images, tables, etc.) check box is selected in the Rich Text Box Properties dialog box so that users can insert pictures and tables inside the rich text box. You can specify that users can embed images in the form, which saves the actual image data in the underlying form (.xml) file, or link images, which saves a hyperlink reference to the image in the .xml file. Certain settings are not supported in browser-compatible form templates, such as enabling linked images in rich text boxes.

Display

Display placeholder text

If you want to provide guidance to your users about what data to enter into the rich text box, you can type instructional text in the Placeholder box. For example, if you have a preferred way in which you want users to fill out the rich text box, you can use placeholder text to provide instructions.

Like a default value, placeholder text appears inside a text-entry control when a user first opens a form. However, placeholder text is different from default values in the following three ways:

  • Placeholder text is never saved as data in the form (.xml) file.

  • Unlike a default value, which appears as regular text inside a control, placeholder text always appears dimmed.

  • Unlike a default value, placeholder text is not supported in browser-compatible form templates.

Display

Make the rich text box read-only

To prevent users from changing the contents of a control, select the Read-only check box. For example, in one view, users might type data in a rich text box. In a second, summary view, users might review what they typed in a read-only version of the rich text box. Although a read-only rich text box does not appear dimmed on the form, users will be prevented from typing information in the rich text box.

Display

Turn off the spelling checker

If you want to prevent users from checking the spelling of text inside a rich text box, you can clear the Enable spelling checker check box, which is selected by default. For example, you can disable the spelling checker for rich text boxes that display proper names.

Display

Prevent text from wrapping

By default, text wrapping is enabled in rich text boxes. If you want to prevent text from wrapping, clear the Wrap text check box. If text wrapping is enabled, you can select scrolling options in the Scrolling list. For example, you can make scroll bars appear in the rich text box when users type more text than the rich text box can display by default. For scrolling options to work properly, your rich text box must be a fixed height and width.

Display

Add conditional formatting

Click Conditional Formatting to open the Conditional Formatting dialog box, where you can change the appearance of a control, including its visibility, based on values that users enter into the form. For example, you can use conditional formatting to hide a rich text box unless a specific check box is selected.

Size

Adjust size, padding, and margins

You can manually specify the size of a control by entering values in the Height and Width boxes. You can also refine the spacing both inside and outside the control by changing the padding, which is the amount of buffer space surrounding the control's contents, or the margins, which is the amount of space between the control's border and any surrounding text or controls on the form template.

Size

Align the rich text box with its label

To better align the text in a rich text box with its label, click the Align button. When aligning a rich text box, Microsoft Office InfoPath changes the existing value in the Height box to auto. This reduces the height of the rich text box so that the text inside it is better aligned with the surrounding text. InfoPath also changes padding and margin settings as appropriate.

Advanced

Specify a ScreenTip

To make an explanatory note appear when users move their pointer over the control, enter the text that you want in the ScreenTip box. Accessibility aids, such as screen review utilities that make on-screen information available as synthesized speech or a refreshable Braille display, often rely on these ScreenTips to interpret information for their users.

Advanced

Change the tab index order

You can change the position of a control in the form template's overall tab order. Tab order is the order in which the focus moves in a form from one field or object to the next as users press TAB or SHIFT+TAB. The default tab index setting for all controls in a form template is 0, but the tab order starts with 1. That is, any control with 1 in the Tab index box will be visited first when users press the TAB key. Any control with 2 in the Tab index box will be visited second, and so on. Any controls with 0 in the Tab index box will come last in the tab order. If you want to skip controls in the tab order, enter -1 in the Tab index box.

Advanced

Assign a keyboard shortcut

You can type a letter or number in the Access key box to specify a keyboard shortcut. Keyboard shortcuts enable users to navigate to a control by pressing a combination of keystrokes, rather than by moving the mouse. If you choose to use keyboard shortcuts in your form template, you must communicate to users that the shortcuts exist. For example, you might type (ALT+S) after a text box label to let users know that there's a keyboard shortcut for a Salesperson text box.

Advanced

Specify and customize merge actions

Click Merge Settings to specify how data that users enter into the control should appear when several forms are combined. For example, you can choose to prefix each item from a rich text box with a particular word, or separate each item with a semicolon.

Advanced

Obtain the ViewContext identifier for the rich text box

You can use the ViewContext value to identify the control in code. For example, if you know the ViewContext value, you can use that value with the ExecuteAction method of the View object to programmatically perform an editing action on the XML data that is bound to the control.

Advanced

Specify and customize an input scope

Click Input Scope to specify the type of user input that is intended for the control. This can help improve the recognition of handwriting and speech input for the control. For example, if you use the IS_URL input scope for the control, InfoPath knows to ignore spaces between words.

Browser forms

Customize settings for posting data back to the server

The Browser forms tab appears only when you are designing a browser-compatible form template. It allows you to control whether data is sent to the server when users change data in the rich text box.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×