• Developer
  • Spam
Search »


Please note: this method and its configuration have changed from Form Tools 2. This page explains the ins and outs of the displayPostFormCaptchaError() method, but be sure to check out the tutorial on Adding a CAPTCHA to your form that explains a few other things you'll need to know to get it working on your form.

This function was added to help abstract away some of the nagging details of adding CAPTCHA spam detection script to a POST form. The function should be included at the top of your POST forms that contain a reCAPTCHA. It displays an appropriate error message if the user fails to enter the CAPTCHA properly. Usage:

The default error message is Sorry, the CAPTCHA (image verification) was entered incorrectly. Please try again. This message always in English. To override it in the language of your choice, to change the wording or style the content, you can just pass in a string as the parameter, containing whatever HTML content you want. e.g.:

That will then embed that HTML and error message into the page.