Text Field
This page provides information on using the Text Field component to gather and validate user input such as text, numbers, emails, and passwords.
Properties
The following properties are available to configure the behavior of the component from the form editor (this is in addition to common properties.
Type
- Options:
- Text
- Password
Prefix
A "prefix" is a sequence of characters at the beginning of a string. It is added to the front of the original string.
Suffix
A "suffix" is a sequence of characters at the end of a string. It is added to the end of the original string.
Default Value
This allows you to set the default value for the input field. formData is exposed.
Empty as Default
Whether the component should be initialized to an empty string.
Min Length
This sets a minimum length allowed for user input. If validation is not satisfied then a Validation error message
will be rendered beneath the text field.
E.g. Password must be at least 5 characters
Max Length
This sets a maximum length allowed for user input. Once the validation has been satisifed then it will restrict user input.
Validator
This allows for javascript
expressions to enter custom validator logic and should return a promise.
Example implementation can be found here