Spam is a huge problem, if you don't protect your forms with some sort of anti-spam measure, it won't be long before you are receiving a huge amount of unsolicited email. Fortunately Google has invented it's RECAPTCHA v3, which works behind the scenes, validating users. If a user is suspected of being a bot, it will show a series of images to test that the user is human. If the user fails the test, then no email is sent.
However, although the RECAPTCHA is very good at what it does, it is not trouble free. The reason I wanted to write this blog post is because I often have trouble with the RECAPTCHA, especially with new sites and actually getting it working. This blog post is written for Concrete5 / CMS but some of these concepts may apply to other website platforms too.
You try to submit a form, it doesn't submit and just shows this error instead:
Potentially it is a very serious issue leading to lost enquiries etc. We need to fix it, but what does the error mean and how do we fix it?
This error is returned from the form block controller in Concrete5:
// check captcha if activated if ($this->displayCaptcha) { $captcha = Core::make('helper/validation/captcha'); if (!$captcha->check()) { $errors['captcha'] = t('Incorrect captcha code'); $_REQUEST['ccmCaptchaCode'] = ''; } }
It's a bit generic, so we need to try various things:
With some pain, using Google's RECAPTCHA means you can prevent the majority of spam. It won't block everything, but should bring it down to manageable levels.
Special thanks to https://www.mesuva.com/ for helping us with this article.
If you have any other tips, please email us and we'll be happy to include them and link back to your website.
Want to have your say on this topic? Start by posting your comment below...
12 November 2024
16 October 2024
10 October 2024
We are a digital agency specialising in Web Design, Development, Concrete5 and digital marketing, based in London & West Sussex.
We make digital simple. Our purpose is to simplify your frustrations in digital and solve the challenges you face to help make you more money and progressively grow your business or organisation.
Tell me moreKeep up to date