How do I customize the error messages?
-
hello,
even though I have put my custom error message in the field “General error message” in the Form Settings tab, when I test it I see another error message. In detail:1. When I don’t put an email and press Submit I see the message: “Please fill out this field”. How can I change this message?
2. When I put a wrong email and press Submit I see the message: “Please enter an email address”. How can I change this message?
Thank you for your support.
-
Hi there,
This is because of the HTML 5 attributes and is called browser validation. The messages are in the language of the browser your visitor is using. If you want, you can change them using JavaScript but it is a bit hacky.
Although I recommend against changing these messages, you can do so using a JavaScript function called
setCustomValidity(). A quick Google search should help you out, but here are some links to get you started.http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-cva-setcustomvalidity
http://stackoverflow.com/questions/10361460/how-can-i-change-or-remove-html5-form-validation-default-error-messages
http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-messageHope that helps.
Good luck!
Thank you Danny, I ll give it a try.
The reason I need to do this is because I want the message to appear in the native language (Greek) and not in English. Am I thinking correctly?Thanks again!
Hi lightgear,
If your visitors visit your website from a Greek browser, the messages will appear in Greek already. 🙂 The messages use the language setting of the browser.
Good luck though!
The topic ‘How do I customize the error messages?’ is closed to new replies.