When using web forms, the best practice is to validate if the user entered information before sending it to your leads panel. Data validation is also important to help the user when he is making mistakes in the data format or if they forget to fill a required field.
In Hover Lead, we have already set a few major validation rules for common fields, such as email address, phone number, number field and required field. In addition, you can set the minimum and maximum length that you expect for each field you want.
To configure a basic type of text field, please follow these steps:
- Click on “Forms” at the side bar
- Click on the “Settings” button of the form you want to adjust
- Click on the “Fields” tab
- Open the field you want to configure by clicking on the “+” button
- Select the type in the “Type” select box
- To finish, click on the “Update Fields List” button
Note – this configuration is relevant only to text fields and will not be applied on any other types of fields such as text area, checkbox, radio buttons, etc.
To configure a field to be required, please follow these steps:
- Click on “Forms” at the side bar
- Click on the “Settings” button of the form you want to adjust
- Click on the “Fields” tab
- Open the field you want to configure by clicking on the “+” button
- Check the “Required” checkbox if necessary
- To finish, click on the “Update Fields List” button
To change the minimum or maximum length of the text field, please follow these steps:
- Click on “Forms” at the side bar
- Click on the “Settings” button of the form you want to adjust
- Click on the “Fields” tab
- Open the field you want to configure by clicking on the “+” button
- Edit the fields “Min Length” and “Max length” with minimum and maximum characters number
- To finish, click on the “Update Fields List” button
Error Messages
When a user tries to submit a form with values that do not match your requirements, the form will present him with the corresponding error message.
Some error messages include dynamic values in their phrasing, for instance, when a value is too short, you may want to say “Number has to be at least X digits long” while “X” is the number of the minimum digits you want to accept, for that we are using placeholders with indicators wrapped with curly parentheses.
To edit an error message, please follow these steps:
- Click on “Forms” at the side bar
- Click on the “Settings” button of the form you want to adjust
- Click on the “Errors & Messages” tab
- Edit the messages in the text inputs for each validation case
- Optionally, add a field name or a field value as a placeholder by clicking on the “Add Field Name” or “Add Value” links next to the input label
- To finish, click on the “Update Errors & Messages” button