Plain text

Allows users to enter plain text. You can display placeholder text to guide your users.

Data binding

Set or modify the data binding for the view in the General properties. The Plain text view can be bound to a String variable.

Configuration properties

Under Configuration, set or modify the appearance and behavior properties for the view. Under Events, set the formula configuration properties.

Screen size
A configuration property that has the Screen Sizes icon The Screen Sizes icon beside the property name can have different values for each screen size. If you do not set a value, the screen size inherits the value of the next larger screen size as its default value.
Theme definitions
Theme definitions specify the colors and styles for a view and determine its appearance. You can preview the look and feel of views in the theme editor. See Themes.

The appearance configuration properties for Plain text are shown in the following table:

Table 1. Appearance configuration properties for Plain text
Appearance configuration property Description Data type
Width The Screen Sizes icon The width of the view. You can specify the width in px (pixels), % (percent), or em units. For example, 50px, 20%, or 0.4em. If a unit type is not specified, px is assumed. String
Size The Screen Sizes icon The text size. The size applies to both the label and the text. String
Label placement The Screen Sizes icon The placement of the label in relation to the text. Labels on the left change the specified width of the view. String
Label width Large screen icon The width of the label. You can specify the width in px (pixels), % (percent), or em units. For example, 50px, 20%, or 0.4em. If a unit type is not specified, px is assumed. String
The behavior configuration properties for Plain text are listed in the following table:
Table 2. Behavior configuration properties for Plain text
Behavior configuration property Description Data type
Tab index The tabbing sequence index. The tab indices start at 1 and can be set sparsely. For example, you can use 1, 5, 10. The Tab index property controls the tabbing sequence when you move between UI areas by pressing the Tab key. Integer
Placeholder text The placeholder text that is displayed when no value is entered. String
Validate input The regular expression to use for validating input. String
Select text on focus Selects all the text in the text field that has the focus. Boolean

Events

Set or modify the formula configuration properties and the event handlers for the view in the Events properties. You can set events to be triggered programmatically or when a user interacts with the view. For information on how to define and code events, see User-defined events.
The formula configuration properties for Plain text are listed in the following table:
Table 3. Formula configuration properties for Plain text
Formula configuration property Description Data type
Text expression Provides the expression or formula that calculates the text in the Plain text view. You can set the text either by using a static string or dynamically by using a formula.

For more information about formulas, see Formulas.

String
Plain text has the following types of event handlers:
  • On load: Activated when the page loads. For example:
    me.setText("Some default text on load.")
  • On change: Activated when the text is changed. For example:
    if(newText != oldText){return confirm ("Are you sure you want to change the text field?");}
  • On focus: Activated when the focus moves to the text field. For example:
    me.setLabelPlacement("T")
  • On blur: Activated when the text field loses the focus. For example:
    me.setLabelPlacement("L")
  • On input: Activated when the user enters text in the text field. For example:
    return potential.length<=10;

Methods

For detailed information on the available methods for Plain text, see the Plain text JavaScript API.

Additional resources

For information about how to create a coach or page, see Building coaches.
For information about standard properties (General, Configuration, Positioning, Visibility, and HTML Attributes), see View properties.