Type ahead text

Auto fills text based on the selection service that is attached to it, allowing for faster input.

Configuration properties

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

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 Type ahead text are shown in the following table:
Table 1. Appearance configuration properties for Type ahead text
Appearance configuration property Description Data type
Width Specifies 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 no unit type is specified, px is assumed. By default, no width is specified. String
Height Specifies 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 no unit type is specified, px is assumed. By default, no width is specified. String
Label placement The Screen Sizes icon Specifies one of the following label placement locations for the view:
  • Top: The label is placed at the top of the view.
  • Left: The label is placed at the left of the view.
The default value is Top.
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 Type ahead text are shown in the following table:
Table 2. Behavior configuration properties for Type ahead text
Behavior configuration property Description Data type
Tab index Specifies the tabbing sequence index of the form view. The tab indices start at 1 and may be set sparsely. By default, no tabbing sequence index is specified. Integer
Placeholder text Text that is displayed when no text is entered. String
Number of drop-down items The maximum number of drop-down items to display when the user starts typing. The default number is 4. Integer
The items configuration properties for Type ahead text are shown in the following table:
Table 3. Items configuration properties for Type ahead text
Items configuration property Description Data type
Item lookup mode Specifies the method you can use to populate the selection list. The available options are: Start Empty, Items From Service, Items From List. String
Type-ahead items service A service flow with appropriate Ajax service access that populates the type-ahead list. The service is used when the lookup mode is Items From Service.
Tip: When the view is backed by a list items service, the service uses two variables: an input variable of type string named data, and an output variable of type list named results, which outputs the result as the data that is bound to the view. If the output variable name is not results of the list items service, no values will be available to use.
Service Flow
Items list Items to populate the type-ahead list. The Item input data is used only if the item lookup mode is set to Items From List. String[]

Events

Set or modify 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 about how to define and code events, see User-defined events.
Type ahead text has the following types of event handlers:
  • On load: Activated when the view is loaded, for example

    me.setPlaceholder(${Data1}.getValue())

  • On change: Activated when the binding data changes, for example

    ${Service1}.setInputData(me.getText());${Service1}.execute()

Methods

For detailed information about the available methods for Type ahead text, see the Type ahead 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.