Title: Advanced Custom Fields: reCAPTCHA Field
Author: Irvin Lim
Published: <strong>2015 年 7 月 9 日</strong>
Last modified: 2019 年 1 月 12 日

---

搜索插件

![](https://ps.w.org/advanced-custom-fields-recaptcha-field/assets/banner-772x250.
png?rev=1682143)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/advanced-custom-fields-recaptcha-field/assets/icon-256x256.
png?rev=1682143)

# Advanced Custom Fields: reCAPTCHA Field

 作者：[Irvin Lim](https://profiles.wordpress.org/irvinlim/)

[下载](https://downloads.wordpress.org/plugin/advanced-custom-fields-recaptcha-field.1.3.3.zip)

 * [详情](https://cn.wordpress.org/plugins/advanced-custom-fields-recaptcha-field/#description)
 * [评价](https://cn.wordpress.org/plugins/advanced-custom-fields-recaptcha-field/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/advanced-custom-fields-recaptcha-field/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/advanced-custom-fields-recaptcha-field/#developers)

 [支持](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/)

## 描述

ACF reCAPTCHA brings Google reCAPTCHA to [Advanced Custom Fields](https://wordpress.org/plugins/advanced-custom-fields/),
to be used on frontend forms.

Features include:

 * _ACF reCAPTCHA Protection_ ensures that spambots cannot circumvent reCAPTCHA 
   to submit forms on the server-side
 * ACF-compliant client-side validation which prompts the user if reCAPTCHA is not
   clicked or had expired
 * Customizable reCAPTCHA options, including theme (light/dark), type (image/audio)
   and size (normal/compact)
 * Compatible with ACF Conditional Logic feature, which allows hiding/showing certain
   fields until the reCAPTCHA has been passed

For more detailed setup instructions, or to report an issue, please head over to
the GitHub repository [here](https://github.com/irvinlim/acf-recaptcha).

#### ACF Frontend Forms

ACF reCAPTCHA is meant to be used **only on frontend forms**, in order to protect
them from spam by spambots.

To create a frontend form programmatically, please view the official documentation
on the ACF website [here](https://www.advancedcustomfields.com/resources/create-a-front-end-form/).

#### ACF Compatibility

ACF reCAPTCHA is currently only compatible with ACF v5 at the moment. If you would
like to help to add support for v4, do submit a PR on GitHub.

#### GitHub

[https://github.com/irvinlim/acf-recaptcha](https://github.com/irvinlim/acf-recaptcha)

## 屏幕截图

 * [[
 * ACF reCAPTCHA customization in the ACF backend page. Enter your site and secret
   keys here.
 * [[
 * ACF reCAPTCHA Protection toggle under Field Group Settings. Use this to ensure
   that your forms are fully protected against spambots.
 * [[
 * Example frontend form with ACF reCAPTCHA used with Conditional Logic. The textarea
   is only displayed when the reCAPTCHA is solved.

## 安装

In order to use ACF reCAPTCHA, you need to generate your reCAPTCHA API keys for 
your domain at the [Google reCAPTCHA Dashboard](https://www.google.com/recaptcha/admin)
first.

 1. In the ACF field group edit page, click _Add Field_ to add a new field.
 2. Find the _reCAPTCHA_ field type under _Custom_.
 3. Enter your site key and secret key that was generated previously.
 4. _(optional)_ Configure the theme, size and type of the reCAPTCHA widget.
 5. **Important**: Scroll down to the bottom of the page, and enable _ACF reCAPTCHA
    Protection_ for the field group.

## 评价

![](https://secure.gravatar.com/avatar/96ca8aa6f19cb36727aab9e214ad70f1f647bbdbb81e47d8589d7c83f42a3334?
s=60&d=retro&r=g)

### 󠀁[Realy helpfull plugin](https://wordpress.org/support/topic/realy-helpfull-plugin-2/)󠁿

 [Matthias Honert](https://profiles.wordpress.org/matthias-honert/) 2019 年 1 月
15 日

If you using Advanced Forms with ACF and you need spam protection for your front
end form — this is the perfect solution.

![](https://secure.gravatar.com/avatar/5a8ded12d8cc1575ccb4375e2ad57d83e5983b5a55371cf7ff6c37faeb975e8b?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-4492/)󠁿

 [codevelop](https://profiles.wordpress.org/codevelop/) 2017 年 11 月 28 日 1 回复

Plugin works great. I had a few questions and ideas, and the dev was amazingly quick
to respond, eager to help, and very collaborative. 5 stars!

![](https://secure.gravatar.com/avatar/95377293a87943ab05d9fa8628bab10b93b13dca63fe3bf1a02ccbe335db4dc3?
s=60&d=retro&r=g)

### 󠀁[Kinda works](https://wordpress.org/support/topic/kinda-works-4/)󠁿

 [radgh](https://profiles.wordpress.org/radgh/) 2017 年 9 月 21 日 5 回复

Tried using this with an acf_form that created a new post, using the method to put
it inside the acf_form() function. It worked, but you have to submit the form once
before you can fill out the rest of the form. This actually creates blank posts!
And configuration is just very convoluted. Some other reviews say it worked out 
of the box. What? Not for me. But I’m not using it in a field group, because it 
should only appear for guests. Oh well.

![](https://secure.gravatar.com/avatar/9114e8284c9d69250a1f0d1df0b58a70fa1f0db4074c084de30c0ecab07eaec1?
s=60&d=retro&r=g)

### 󠀁[Works like a charm](https://wordpress.org/support/topic/works-like-a-charm-1083/)󠁿

 [silentfred](https://profiles.wordpress.org/silentfred/) 2017 年 8 月 12 日 1 回复

Thank you for contributing this!

![](https://secure.gravatar.com/avatar/eb70a9362cda7cbb382828f37333b6392237b023157320fa324e61468694f094?
s=60&d=retro&r=g)

### 󠀁[Works brilliantly!](https://wordpress.org/support/topic/buggy-13/)󠁿

 [dornstudio](https://profiles.wordpress.org/dornstudio/) 2017 年 7 月 30 日 2 回复

Had some issues in the past, but have edited this review as this plugin has been
updated and works perfectly now.

![](https://secure.gravatar.com/avatar/0bdd696d1ea605677abe612d69a5a1003920853718e7345b6b07a4dbb1ec337e?
s=60&d=retro&r=g)

### 󠀁[Works out of the box (when the keys are entered)](https://wordpress.org/support/topic/works-out-of-the-box-when-the-keys-are-entered/)󠁿

 [Andrija Naglic](https://profiles.wordpress.org/andrija/) 2017 年 5 月 8 日 1 回复

Although it seems this plugin was broken and not maintained for several months, 
I’ve installed it just now, exactly one week since it’s last update – and it’s simple
functionality just – works. I hope it will continue to work and that Google won’t
change much in their API, but in case something does break, I will return here to
add comments to this review. Till then, I believe the author deserves 5 stars for
his effort, at least to improve the overall rating of the plugin which is currently(
unjustified) 3.3 Keep up the good work!

 [ 阅读所有12条评价 ](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/reviews/)

## 贡献者及开发者

「Advanced Custom Fields: reCAPTCHA Field」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Irvin Lim ](https://profiles.wordpress.org/irvinlim/)

[帮助将「Advanced Custom Fields: reCAPTCHA Field」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/advanced-custom-fields-recaptcha-field)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/advanced-custom-fields-recaptcha-field/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/advanced-custom-fields-recaptcha-field/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/advanced-custom-fields-recaptcha-field/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/advanced-custom-fields-recaptcha-field/)。

## 更新日志

#### 1.3.3

 * Fix undefined index errors

#### 1.3.2

 * Disable plugin on ACF versions which are not supported (e.g. ACF v4)

#### 1.3.1

 * Fixed settings page link from the Plugins page
 * Removed shorthand array syntax (not supported on PHP < 5.4)

#### 1.3.0

 * Added settings page to configure site-wide default reCAPTCHA keys, if not specified

#### 1.2.1

 * Better handling of server-side reCAPTCHA verification errors
 * Accepted ‘true’ as a string value when using acf_form() to set the flag directly
 * Perform server-side verification of recaptcha fields in form even if recaptcha
   flag is not set (to catch misconfigurations)

#### 1.2.0

 * Fixed an important security bug, which allowed bots to bypass reCAPTCHA. Read
   more [here](https://github.com/irvinlim/acf-recaptcha/pull/22)
 * Multiple reCAPTCHA widgets will be able to render on the same page
 * Removed AJAX verification of reCAPTCHA values and instead perform it only during
   form submission
 * Expiry of reCAPTCHA value will trigger an ACF validation error on the client 
   side
 * Made help text and links available in the Field Group settings page to reference
   ACF reCAPTCHA Protection easily

#### 1.1.1

 * Added an Upgrade Notice box for future important upgrade notices
 * Make Google reCAPTCHA API JS load asynchronously to prevent possible race conditions

#### 1.1

 * Bump to version 1.1 (no changes since 1.0.8), as the plugin was not following
   semantic versioning earlier. Revamped the README and added a fresh new icon to
   celebrate! 🙂
 * Summary of new features since 1.0:
    - Removed requirement for cURL to be used
    - Add support for ACF conditional logic
    - Numerous other bugfixes

#### 1.0.8

 * Fixes bug in not allowing Options Page to save.

#### 1.0.7

 * Fix regression caused in 1.0.6.

#### 1.0.6

 * Add support for ACF conditional logic.

#### 1.0.5

 * Uses `wp_remote_post` method for the reCAPTCHA POST request. This removes the
   need for cURL on your server.

#### 1.0.4

 * Fix WSOD errors

#### 1.0.3

 * Added fixes for some issues

#### 1.0.2

 * Prevent reCAPTCHA from showing up on backend

#### 1.0.1

 * Support translation of error messages
 * Fix for reCAPTCHA API not being enqueued in certain themes

#### 1.0

 * Initial version

## 额外信息

 *  版本 **1.3.3**
 *  最后更新：**7 年前**
 *  活跃安装数量 **900+**
 *  WordPress 版本 ** 3.0.1 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  语言
 * [English (US)](https://wordpress.org/plugins/advanced-custom-fields-recaptcha-field/)
 * 标签
 * [acf](https://cn.wordpress.org/plugins/tags/acf/)[captcha](https://cn.wordpress.org/plugins/tags/captcha/)
   [field](https://cn.wordpress.org/plugins/tags/field/)[form](https://cn.wordpress.org/plugins/tags/form/)
   [recaptcha](https://cn.wordpress.org/plugins/tags/recaptcha/)
 *  [高级视图](https://cn.wordpress.org/plugins/advanced-custom-fields-recaptcha-field/advanced/)

## 评级

 4.2 星（最高 5 星）。

 *  [  9 条 5 星评价     ](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/reviews/?filter=2)
 *  [  2 条 1 星评价     ](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/reviews/)

## 贡献者

 *   [ Irvin Lim ](https://profiles.wordpress.org/irvinlim/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/advanced-custom-fields-recaptcha-field/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://irvinlim.com/contact/)