How To Create Field Placeholder Text Using Behaviors
This lesson will demonstrate how to create a field that displays placeholder text when the field is a) empty and b) does not have focus.
If you are not familiar with how to create and assign behaviors then please see this lesson.
What I Will Create
Setting the Placeholder Text
You assign the placeholder text by setting the uPlaceholderText custom property (1) of the field (2). The behavior (3) will display this text when appropriate.
You must get and set the text of the field using the uText or uUTF8Text custom properties that are defined in the behavior. These custom properties only return a value if the user has entered some text. They won't return the text if the placeholder is being displayed.
put the uText of field "Field"
The Behavior Script
This is the script of the behavior. In the example stack it is stored in the Placeholder Text Behavior button.