Field Render

Display a Google reCaptcha widget to check the form submission. The field is compatible with reCaptcha version 2 & 3.

See Google reCaptcha documentation and reCaptcha Admin Console.

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 for the whole website using available ACF settings. Usage example:

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
    
}