The text control is used for entering or displaying any text data.

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).

The Text control can be bound to a String variable.


Formula Expression:  This allows you to insert a string in the Text Control. ex. "Hello".  By doing this the Text control is automatically populated with Hello.


Width The width of the text box in (%, px, em)

Size Style Default, Large or Small

Label Placement Top or Left


Tab Index Allows you to control the order of tabbing within a page. It's important to note that tab indices start at 1, instead of at 0

Placeholder Text  Filler text until user inputs text

Regular Expression Allows you to use regular expressions for data validation


These are the configuration option settings...

This is the result...

As you can see the field displays "Hello" from the Text Expression.  This is data that can be passed between services, when bound to a variable.

Another Example

These are the configuration option settings...

This is the result...


With the Text control, there are 5 types of event handlers:

  • On Load  When the page loads
  • On Change  When there is a change
  • On Focus  When you click onto this particular control
  • On Blur  When you are click out of this particular control
  • On Input  When there is something entered into the Text box

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: Dan Abresch
  • Date Created: June 9, 2015
  • Date Modified: June 19, 2015
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request