How to Set Up and Use hCaptcha in WPForms

Would you like to set up hCaptcha to help prevent spam submissions in your WordPress forms? hCaptcha is a free, privacy-conscious alternative to Google’s reCAPTCHA that offers reliable anti-spam protection.

In this tutorial, we’ll show you how to set up and use hCaptcha in WPForms.

  1. Generating hCaptcha Keys
  2. Adding hCaptcha to a Form
  3. Testing hCaptcha

1. Generating hCaptcha Keys

To get started, you’ll need to log into your WordPress site and go to WPForms » Settings. Then, click on the CAPTCHA tab. To configure hCaptcha on your site, be sure the hCaptcha option is selected.

Captcha tab in WPForms

Next, you’ll need to generate a new set of keys in your hCaptcha account to connect to WPForms. To start this setup process, you’ll need to log in to your hCaptcha account.

Once you’ve logged into hCaptcha, you’ll need to click the New Site button in the upper right corner to get started.

This will open up the setup form for your hCaptcha. If you’d like, you can add a name to this specific site key under the Add New Sitekey section by clicking the pencil icon. This is for your reference only, and will not be seen by your users on the front end.

Then, under the General Information, you can configure additional settings for your captcha. We outline each of these settings below.

  • Hostnames: This is the URL of the site you’ll be activating the hCaptcha on.
  • Captcha difficulty: This setting allows you to choose the difficulty level of the hCaptcha within your forms. Setting a lower difficulty level means your users will be presented with an image challenge less often than if you had set a higher difficulty level.
  • Filter captchas by audience interests: This setting allows you to optionally choose up to 3 different interests that will filter what type of content will be shown in your captchas. For example, if you had a family-themed blog, you might choose to filter your captchas with the Family and Relationships filter.

Once you’ve configured your settings, be sure to click the Save button to save your settings.

This will redirect you to your site key’s settings. To view and copy your entire site key, click the Settings button to view more details.

Once you’ve opened these settings, you can view your full site key under the Sitekey section.

Go ahead and copy this key, and paste it into your WPForms settings under the Site Key setting.

Then, you’ll need to copy your Secret Key from hCaptcha into your WPForms settings as well. Go ahead and close out of your site key settings (which you can do by clicking the Save button) to return to your site key overview.

From there, click on the Settings tab. You can then copy your secret key from the Secret Key section within these settings.

Go ahead and paste this secret key into your WPForms settings, and be sure to click the Save Settings button to save your settings.

Now that you’ve added your keys, you can also optionally adjust other hCaptcha settings. We outline each setting below.

  • Fail Message: This error will display to any user who does not pass hCaptcha’s verification test.
  • No-Conflict Mode: If there are several CAPTCHAs being loaded on your site (for example, by both WPForms and your WordPress theme), this can prevent hCaptcha from working properly. No conflict mode will remove any CAPTCHA code that’s not loaded by WPForms. However, we highly recommend getting in touch with our support team if you’re at all unsure whether to use this option.
  • Preview: This setting will show a preview of your hCaptcha on the front end. If things are configured incorrectly, this setting will show an error message, meaning you should double check that your keys are correctly entered into your settings.

2. Adding hCaptcha to a Form

Now that you’ve set up your keys, you’ll be able to add hCaptcha to any of your WPForms.

To do this, go ahead and create a new form or edit an existing form.

After you’ve opened the form builder, look under the Standard Fields section and click on the hCaptcha field.

To confirm that hCaptcha is enabled, look for the badge in the upper right corner of your form builder.

Additionally, you can always turn hCaptcha on or off for a form under Settings » General and toggling the Enable hCaptcha option.

3. Testing hCaptcha

The last step is to run a quick test to make sure that hCaptcha looks and works how you’re expecting.

To test this out, you’ll simply need to submit an entry to your form. For more details on how to test out your forms, please take a look at our full testing checklist.

That’s it! Now you know how to set up and use the hCaptcha in WPForms.

Next, would you like to block email addresses from submitting your forms? Be sure to check out our tutorial on how to create an allow / denylist for more details.