Google reCaptchaFREE

Docs Fields Google reCaptcha

#Field Render

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.

Field Group

#Field Settings

Setting nameDescription
VersionSelect the reCaptcha version
Hide logoHide Google reCaptcha logo (v3)
ThemeSelect the reCaptcha theme
SizeSelect the reCaptcha size
Site keyEnter the site key
Secret keyEnter the secret key

#Field Value

The value cannot be retrieved, as the field isn’t saved as custom meta.

#Global Field Settings

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
    
}