Would you like to change the error text that shows to your visitors on failed submissions? Various issues, from JavaScript errors to plugin conflicts or server-side problems, can cause your form not to submit. When this happens, a message will appear on the screen for your visitors.
To troubleshoot why this could be happening, please take a look at our troubleshooting guide. However, you can easily change this message to something more user-friendly using a small PHP snippet.
Adding the Code Snippet
Add this code snippet to your site to customize the error message:
Customizing the Message
To change the error message, modify line 14 of the code snippet. Replace ‘Hey! Please check under the hood!’ with your desired message. For example:
$translated_text = __('Oops! Something went wrong. Please review your entries below.', 'wpforms');
You can use this snippet to change any error messages, required field messages, or validation messages that appear when the form fails to submit.
And that’s all you need to change the error messages. For a more in-depth look into what might cause this error, please check out our guide on Resolving ‘The form was unable to submit’ Issue in WPForms.