Advanced Custom Fields custom field type for Google's No-CAPTCHA reCAPTCHA, to be used on frontend forms.
![Google reCAPTCHA] (https://www.google.com/recaptcha/intro/images/hero-recaptcha-demo.gif)
Support for ACF v4 coming soon.
You can find more information on reCAPTCHA here. Google introduced a new form of CAPTCHA in 2013 that proved to be easier to solve by humans yet considerably harder for bots to bypass, by introducing a simple checkbox which is all that's needed for humans to pass the verification.
If you haven't already, generate your API keys first. You will need the site key and secret key.
This plugin requires cURL to be enabled on your server, as it makes use of Google's PHP library.
- Copy the
acf-recaptcha
folder into yourwp-content/plugins
folder - Activate the plugin via the plugins admin page
- Create a new field via ACF and select the reCAPTCHA type (under Custom)
- Enter you site key and secret key into ACF options.
That's it! It should work out of the box, as long as your API keys are correct and valid for your domain.
If you are using ACF via the PHP API, this is an example to add the reCAPTCHA field:
acf_add_local_field(array(
'key' => 'field_recaptcha',
'name' => 'recaptcha',
'type' => 'recaptcha',
'label' => 'Prove your humanity',
'site_key' => 'SOME_VALID_RECAPTCHA_KEY',
'secret_key' => 'SOME_VALID_RECAPTCHA_SITE_SECRET',
're_theme' => 'light', // Other options: 'dark'
're_type' => 'image', // Other options: 'audio'
're_size' => 'normal', // Other options: 'compact'
));
Version 1.0
Written by Irvin Lim. If you encounter any issues, do open one.
If you have any other questions, contact me here!