大网数据广告活动
网站运营与故障问答

How to get hCaptcha work with contact form 7 (WordPress)?

· 52CE 我爱测

I don't manage to get hcaptcha to work with Wordpress contact form 7 forms: I have created an account and site at hcaptcha, then installed the hcaptcha plug-in according to the guide at https://wordpress.org/plugins/hcaptcha-for-…

问题原文

原帖链接 · chiccodoro · CC BY-SA 4.0

I don't manage to get hcaptcha to work with Wordpress contact form 7 forms:

I have created an account and site at hcaptcha, then installed the hcaptcha plug-in according to the guide at https://wordpress.org/plugins/hcaptcha-for-forms-and-more/#installation:

  1. Install hCaptcha either via the WordPress.org plugin repository (best) or by uploading the files to your server. (Upload instructions)
  2. Activate the hCaptcha plugin through the ‘Plugins’ menu in WordPress
  3. Enter your site key and secret in the Settings -> hCaptcha menu in WordPress
  4. Enable desired Integrations

Although I did not understand what "Enable desired Integrations" should mean. Underneath the Contact Form 7 menu there is an "Integration" section which, amongst others, provides an Integration for Google's ReCaptcha, but none for hCaptcha.

In the FAQ (https://wordpress.org/plugins/hcaptcha-for-forms-and-more/#how%20do%20i%20use%20the%20hcaptcha%20plugin%3F) they say that "we support Contact Forms 7 automatically. However, sometimes a theme can modify the form. In this case, you can manually add the [cf7-hcaptcha] shortcode to the CF7 form."

I have tried adding the shortcode [cf7-hcaptcha] at the beginning, end, or in the midst of the form markup. When I load the page that contains the form, it always displays "[cf7-hcaptcha]" as a text, and I can send forms without solving any puzzles.

I also tried [hcaptcha] with the same effect.

I have also tried by turning off the "ReCaptcha compatibility" within the hCaptcha settings page.

I have made sure that Google ReCaptcha is NOT active by opening the ReCaptcha integration and confirming that the key and secret fields are empty.

Looking into the F12 console, I cannot recognize any javascript errors related to hCaptcha. Looking into the page source, I can find some CSS code related to hCaptcha in the HTML header but no relevant hCaptcha code in the contact form. The shortcode is rendered as text.

What have I missed?

已采纳解答

原帖链接 · Steve · CC BY-SA 4.0

Inserting external shortcodes into Contact Form 7 won't work by default.

However there is a plugin https://wordpress.org/plugins/contact-form-7-shortcode-enabler/ which enables you to do that.

I have no connection to the plugin

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2023-01-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。