2

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?

1
  • Perhaps you could show the html of a simplified test page Commented Feb 1, 2023 at 3:55

2 Answers 2

3
+50

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

1
  • 1
    Thank you very much. I have installed this plug-in (wondering why it isn't mentioned in the docs for hcaptcha plugin.) The cf7-hcaptcha shortcode was still not working. However the hcaptcha shortcode is now working! The bounty is yours :-) Commented Feb 4, 2023 at 13:19
1

Actually (2024-2025) you can configure it inside the hCaptcha -> Integrations menu.

(Picture in spanish, but enough for understand the places) hCaptcha Integrations

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.