Display a Google reCaptcha widget to check the form submission. The field is compatible with reCaptcha version 2 & 3. Note that as every other fields, the reCaptcha field has to be set as “required” to correctly validate a form.
See Google reCaptcha documentation and reCaptcha Admin Console.
Setting name | Description |
Version | Select the reCaptcha version |
Hide logo | Hide Google reCaptcha logo (v3) |
Theme | Select the reCaptcha theme |
Size | Select the reCaptcha size |
Site key | Enter the site key |
Secret key | Enter the secret key |
The value cannot be retrieved, as the field isn’t saved as custom meta.
It is possible to set the field settings globally in the Settings UIPRO or using the following code:
add_action('acf/init', 'my_acf_recpatcha_settings');
function my_acf_recpatcha_settings(){
acf_update_setting('acfe/field/recaptcha/site_key', 'SITE_KEY');
acf_update_setting('acfe/field/recaptcha/secret_key', 'SECRET_KEY');
acf_update_setting('acfe/field/recaptcha/version', 'v2');
acf_update_setting('acfe/field/recaptcha/v2/theme', 'light');
acf_update_setting('acfe/field/recaptcha/v2/size', 'normal');
acf_update_setting('acfe/field/recaptcha/v3/hide_logo', true); // v3 only
}