Overview
1. OnKeyUp Event
2. Sample Usage: Real-time Form Validation
1. OnKeyUp Event
The OnKeyUp event is available for Text Field and Text Area widgets. The OnKeyUp event occurs when the user releases a keyboard key while typing in the widget. This can be used to respond to keyboard input on text fields and text areas as the user is typing.
2. Sample Usage: Real-time Form Validation
One example usage of the OnKeyUp event is to design a form that provides real-time feedback to the user as they enter data.
Consider a text field for zip code where the length of the value must be equal to 5 characters.
For the first case on the OnKeyUp event of the text field, a condition can be defined to check if the length of the value in the text field is 5 characters long. In that case, a message is shown to indicate that the value is now valid.
In a second case, a message could be shown to indicate that the field is not valid and describes the requirement for the field.
Here are screenshots showing the transition from one state to another state when 5 characters have been entered into the zip code field.