Forms & Customization

Setting fields validation and error messages

145 views November 4, 2017 November 20, 2018 Hover Lead 0

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:

  1. Click on “Forms” at the side bar
  2. Click on the “Settings” button of the form you want to adjust
  3. Click on the “Fields” tab
  4. Open the field you want to configure by clicking on the “+” button
  5. Select the type in the “Type” select box
  6. 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:

  1. Click on “Forms” at the side bar
  2. Click on the “Settings” button of the form you want to adjust
  3. Click on the “Fields” tab
  4. Open the field you want to configure by clicking on the “+” button
  5. Check the “Required” checkbox if necessary
  6. To finish, click on the “Update Fields List” button

To change the minimum or maximum length of the text field, please follow these steps:

  1. Click on “Forms” at the side bar
  2. Click on the “Settings” button of the form you want to adjust
  3. Click on the “Fields” tab
  4. Open the field you want to configure by clicking on the “+” button
  5. Edit the fields “Min Length” and “Max length” with minimum and maximum characters number
  6. 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:

  1. Click on “Forms” at the side bar
  2. Click on the “Settings” button of the form you want to adjust
  3. Click on the “Errors & Messages” tab
  4. Edit the messages in the text inputs for each validation case
  5. 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
  6. To finish, click on the “Update Errors & Messages” button

Was this helpful?