Skip to main content

Overview

Text field elements are input fields where users can enter and edit text using the device’s keyboard. Text fields use Apple’s native text field. Currently, text field’s can only be one line. If you want a mult-line text field, use an editable text element.

Properties

In addition to the properties below, glass effect containers also have access to general object properties in the Expression Editor.

Placeholder Text

Enter the text that will appear in the text field before a user begins typing in it.
TextField.placeholder
Type: string
Can get or set the value.

Value

Enter a value for the text field, which will overwrite the placeholder text. Often, this property will be empty by default, and the user will enter a value.
TextField.value
Type: string
Can get or set the value.

Text Field Style

Set the text field’s style to None, Line, Bezel, or Rounded Rectangle.
TextField.textFieldStyle
Type: string
Values: None, Line, Bezel, Rounded Rectangle
Can get or set the value.

Customize

Colors

Set the colors for the text field’s value fill and placeholder fill.
TextField.placeholderColor
Type: color
Can get or set the tint color or an individual color property.
TextField.textColor
Type: color
Can get or set the tint color or an individual color property.

Text Properties

Set the text properties, which are the same for the placeholder and value. Learn more about text properties.

Keyboard

Type

Set the keyboard’s type to default, email, number pad, numbers and punctuation, phone pad, or decimal pad.
TextField.keyboardType
Type: string
Values: Default, Email, Number Pad, Numbers and Punctuation, Phone Pad, Decimal Pad
Can get or set the value.

Return Key

Set the return key’s CTA to Go, Google, Join, Next, Route, Search, Send, Done, or Continue.
TextField.returnKeyType
Type: string
Values: Go, Google, Join, Next, Route, Search, Send, DoneContinue
Can get or set the value.

Dismiss Keyboard on Return Key

Choose if the keyboard should close when the user hits the return key.
TextField.dismissKeyboardOnReturnKey
Type: boolean
Values:
true = dismiss on return
false = don’t dismiss on return
Can get or set the value.

Auto-Capitalization

Choose if the text field will auto-capitalize nothing, all characters, the first character in each sentence, or the first character in each word.
TextField.textAutoCapitalizationType
Type: string
Values: None, All Characters, Sentences, Characters
Can get or set the value.

Auto-Correction

Choose if the text field will use auto-correction.

Text Content Type

Set the text field’s expected input type so the system has information. Set the type to None, URL, City, State, City And State, Country, Credit Card Number, Date, Time or Duration, Email Address, Flight Number, Shipment Tracking Number, Full Street Address, Name, Name Prefix, Name Suffix, Given Name, Family Name, Job Title, Postal Code, Sublocality, Username, Password, New Password, or One Time Code

Dismiss Button

Choose if the dismiss button is visible on your text field.

Show Clear Button

Choose when the clear button is visible:
  • While Editing: The clear button is always visible unless the user is editing the text field.
  • Unless Editing: The clear button is only visible when the user is editing the text field.
  • Never: The clear button is never visible.
  • Always: The clear button is always visible.

Password

Set if the text field’s value should display as a password. Anything the user types will show as dots like a password field, not as text characters.
TextField.password
Type: boolean
Values:
true = enabled
false = disabled
Can get or set the value.

Tag

Enter a tag number for the text field. This is useful when you have multiple text fields on a page and want to control which text field has focus after a given action.
TextField.tag
Type: string
Can get or set the value.

Resources

Related Triggers & Actions Videos

Messaging App Tutorial

Links
I