When a visitor fills out the form on your page, but their form entry doesn't validate, they'll see some errors, which look like this by default:
You can modify and customize the wording of these errors by adding a snippet of Javascript to your landing page in the Classic Builder!
To add this script,
- Navigate to your page in the Classic Builder.
- Click the Javascripts
button in the bottom left of the Classic Unbounce Builder.
- Click + Add New JavaScript. A new dialog box will appear.
- Give your script a name, set the Placement to Before Body End Tag, and paste in the following code:
- To customize your form validation error messages, update the text within the quotation marks ' ' to whatever you'd like your new message to read. For example:
window.ub.form.validationMessages.your_name.required = 'You forgot to enter your name!';
Here's the result:
Save and Publish your page to finalize these changes!