Type Ahead Text

The Type Ahead Text control auto fills text based on the selection service attached to it.

The Type Ahead Text control comes with many easy to configure items, appearance, and behavior options

Like almost all SPARK controls, you can trigger events that are fired when the user interacts with the control (see the Event and Methods sections below and the Event Handling article for more information).

This control is most commonly used to auto fill selections and allows for faster input as well as error prevention.


Item Lookup Mode Start Empty, Items From Service, Items From List.  This must be specified, and used with the matching option chosen.

Type-ahead Items Service AJAX type-ahead service. Will only be called if item lookup mode is set to items from service.

Items List If not using a service, you can add your items here, for example


Width Width in px, %, em; for example: 50px, 20%, 0.4em. If no unit is specified, px is assumed

Size Style Default, Large, Small

Label Placement Choose from drop-down list: Top or Left


Tab Index Form control tabbing sequence index. Tab indices start at 1, and may be set sparsely.

Label Placement Enter text you want the user to see to help them


These are the configuration options settings...

This is the result...

Before user starts typing, you can see the placeholder text.

After the user starts typing.


With the Type Ahead Text control, there are 2 types of event handlers:

  • On Load When the page loads
  • On Change When there is a change

You can use JavaScript logic to affect the effects of the control, depending on the event. More information on using these controls can be found in the Event Handling article.


For detailed information on the available methods for this control, access the JS Doc file


  • Author: Elliot Pytosky
  • Date Created: June 8, 2015
  • Date Modified: September 21, 2015
Was this article helpful?
0 out of 0 found this helpful