0115 964 8205
WordPress is a very popular platform that millions of web sites utilise as their content management system of choice. The ease of use and wide array of plugins that are available to expand its functionality make this platform very attractive for users.
One of the plugins that is very often utilised by users whom want to easily create contact forms on their site is Contact Form 7 (CF7). The plugin quickly allows users to create fields and implement their constructed forms in to posts and pages via a generated shortcode.
One of the great features of Contact Form 7 is the easy implementation of Google reCAPTCHA, a spam prevention API that many users will be familiar with seeing across the web. Google reCAPTCHA reduces spam by requiring end users to click areas of generated images that match the written request. Once correctly selected reCAPTCHA will allow the form that it has been implemented with to be submitted.
This process helps distinguish between bots and human users and should aid in reducing the amount of spam submissions from bots via forms.
At the end of October 2018, Google announced the launch of reCAPTCHA v3 that brings an evolved functionality compared to previous revisions. The first generation, reCAPTCHA v1 generated a an image containing distorted text that users would need to successfully input in to a field. The second major revision, reCAPTCHA v2 evolved the same fundamental process of a generated word, however an accompany group of images were presented for the end users to select those that featured the word.
Google reCAPTCHA v3 has completely evolved the process that users have experienced with past versions. reCAPTCHA v3 performs risk analysis to identify spam signals and machine learning to combat bots. It also provides an unobtrusive experience “without user friction”, removing user input from the reCAPTCHA process. Full details of the changes and how the changes work is available on the Google Webmaster Central blog: https://webmasters.googleblog.com/2018/10/introducing-reCAPTCHA-v3-new-way-to.html.
Towards the end of December 2018, Contact Form 7 received its v5.1 updated that saw the migration for Google reCAPTCHA v2 to v3. As WordPress does not automatically update plugins, your WordPress installation you may not have updated to this version.
Full details of the features introduced in this build can be viewed via the WordPress plugins repository here: https://en-gb.wordpress.org/plugins/contact-form-7/#developers.
There are many users that have updated the Contact Form 7 plugin to v5.1 and had an issue with Google reCAPTCHA breaking. Instead of the reCAPTCHA box being rendered on a form, the shortcode was instead being shown and subsequently spam form submissions were being received.
This issue is due to Contact Form 7 v5.1 migrating to Google reCAPTCHA v3. When updating the plugin, any API keys for reCAPTCHA v2 were removed from the respective fields within the plugins configuration. The reason for this is that they would now be redundant and no longer work with the updated v3 of the API.
How can you rectify this issue? The solution is extremely simple and involves generating reCAPTCHA v3 API keys and inputting them within the plugins configuration as detailed within the steps below.
Our first steps to follow are to generate Google reCAPTCHA v3 API keys.
Your keys will now be generated and displayed.
Our secondary steps are to configure the Contact Form 7 plugin to utilise the new API keys that were generated for your site.
Now that your Google reCAPTCHA v3 values have been added to the Contact Form 7 integrations configuration, your forms will now be protected once again from those pesky spam bots.
On the front end you will notice that a sitewide tab will be present in the bottom right hand corner of the screen that expands on hover, labelled “protected by reCAPTCHA”. The new revision of reCAPTCHA with the plugin implements a script across site that monitors usage to help distinguish between bot and human users. You will also notice that no user input is required with reCAPTCHA on your forms.
Note: If your site utilises a caching plugin, you may need to flush / clear the caches for the changes to take effect.
The shortcode within your forms for displaying a Google reCAPTCHA code has now been made redundant. Subsequently if the plugin detects the shortcodes, it will not display them on the front end, which is great if you are yet to remove them from your forms.
A 14 year industry veteran that specialises in wide array of online marketing areas such as PPC, SEO, front end web development, WordPress and Magento development.
Accredited Google Partner & Bing Ads qualifications, BA (Hons) in Digital Marketing. One half of the Director duo at Kumo.