Develop > Tailoring Best Practices > Form tailoring > Typing text into a control

Typing text into a control

Forms Designer offers three controls that allow users to type text into a control.

  • Text
  • Text Area
  • HTML Editor

You can determine which of these controls to use by the amount and formatting of the text you want users to type.

If you want users to type a single line of unformatted text, then use a Text control. See Combo Box.

If you want users to type in multiple lines of unformatted text, then use a Text Area control. See Comfill.

If you want users to type in any amount of HTML-formatted text, then use an HTML Editor control. See HTML Editor below.

Text

The Text control allows users to type in or view a single line of unformatted text. You can also make a Text control read-only to display the value of a particular field or if the control is part of a Subform control virtual join.

Example Text control

The benefits of a Text control are listed below.

  • You can make the control read-only to display data you do not want users to change, such as a record ID number.
  • RDBMS tools can typically query Text control fields as long as you map the field to a simple character data type in the back-end RDBMS.
  • Third-party reporting tools can typically read Text control fields as long as you map the field to a simple character data type in the back-end RDBMS.
  • The user does not have to apply any text formatting to the value typed.
  • If the control is editable, users can update the text value at any time.

The costs of a Text control are listed below.

  • The content of the control is displayed on one line of text. The database definition mapping of the fields determines the width of the line. For example, if the input field is mapped to a VARCHAR(255) column, then a user can only type 255 characters of text.
  • The control uses the character encoding of the back-end RDBMS to determine how to store character data. If users type in text using a character encoding that your system does not support, the data will likely become corrupted.
  • It is difficult to validate that users type in meaningful values into the control.
  • There is no way for users to format the text they type into the control.
  • The longer the width of the Text control the more form space the control requires.

In general, a Text control is best used in the following circumstances.

  • The user only needs to type in or view a single line of text.
  • You want the option to make the text read-only. For example, the text is a unique ID or part of a virtual join in a Subform control.
  • You do not need to format the text.

If you want users to type multiple lines of text, use a Text Area controls instead. If you want users to be able to format the text they type in, use an HTML Editor control instead.

Text Area

The Text Area control allows users to type in or view multiple lines of unformatted text. You can also make a Text Area control read-only to display the value of a particular field or if the control is part of a Subform control virtual join.

Example Text Area control

The benefits of a Text Area control are listed below.

  • Users have multiple lines in which to type or view text.
  • You can make the control read-only to display data you do not want users to change, such as the description of an open interaction.
  • RDBMS tools can typically query Text Area control fields as long as you map the Text Area's input field to a multi-row array table. See the Multi-row array table section in Array mapping options.
  • Third-party reporting tools can typically read Text Area control fields as long as you map the Text Area's input field to a multi-row array table. See the Multi-row array table section in Array mapping options.
  • The user does not have to apply any text formatting to the value typed.
  • If the control is editable, users can update the text value at any time.

The costs of a Text control are listed below.

  • You must choose an array mapping strategy in which to store the Text Area control data. See Array mapping options.
  • The control uses the character encoding of the back-end RDBMS to determine how to store character data. If users type in text using a character encoding that your system does not support, the data will likely become corrupted.
  • It is difficult to validate that users type in meaningful values into the control.
  • There is no way for users to format the text they type into the control.
  • The longer the width of the Text Area control the more form space the control requires.

In general, a Text Area control is best used in the following circumstances.

  • The user needs to type in or view multiple lines of text.
  • You want the option to make the text read-only. For example, the text is a part of an closed record or part of a virtual join in a Subform control.
  • You do not need to format the text.

If you want users to type a single line of text, use a Text controls instead. If you want users to be able to format the text they type in, use an HTML Editor control instead.

HTML Editor

The HTML Editor control allows users to type in and format multiple lines of text for display in an HTML Viewer control. Unlike other text input controls, if you do not want users to change the HTML text, you must display it in an HTML Viewer control.

The benefits of an HTML Editor control are listed below.

  • Users can format multiple lines of text for display with the built-in editing tools or with HTML tags.
  • Users can spell check the text.
  • RDBMS tools can typically query HTML Editor control fields as long as you map the HTML Editor's input field to a multi-row array table. See the Multi-row array table section in Array mapping options.
  • Third-party reporting tools can typically read HTML Editor control fields as long as you map the HTML Editor's input field to a multi-row array table. See the Multi-row array table section in Array mapping options.
  • Users can update the text value at any time.

The costs of an HTML Editor are listed below.

  • You must use a separate HTML Viewer control to display a read-only version of data you do not want users to change, such as an approved knowledge article.
  • You must choose RDBMS mapping that has sufficient space for potentially large HTML input. Typically, an array mapping strategy is best for storing HTML Editor control data as there is no risk of data truncation when users type large amounts of text. See Array mapping options.
  • The control uses the character encoding of the back-end RDBMS to determine how to store character data. If users type in text using a character encoding that your system does not support, the data will likely become corrupted.
  • It is difficult to validate that users type in meaningful values into the control.
  • You must use a separate HTML Viewer control to provide a read-only version of the text.
  • The longer the width of the HTML Viewer control the more form space the control requires.

In general, an HTML Editor control is best used in the following circumstances.

  • The user needs to type in and format multiple lines of text. For example, the text is a knowledge document.
  • You want the option to spell check the text.

If you do not want users to format the text, use either a Text or Text Area control instead. Likewise, if you need to display the value of another text field in the system, use either a Text or Text Area control.