hCaptcha is a free and privacy-oriented spam prevention service. Just like Google’s V2 reCAPTCHA, hCaptcha displays a checkbox and ask users to prove they are human. It is very effective when it comes to blocking spam.
They use advanced machine learning and AI to detect the difference between humans and bots and protect from spam.
You can say hCaptcha is an alternative to Google reCAPTCHA, but also comes with the latest privacy laws like GDPR and CCPA complaints.
So, that’s why in this tutorial, I will show you how you can add hCaptcha in your WordPress forms.
Here I will be use WPForms, which is the best and advanced form building plugin for WordPress.
Using WPForms, you can create any type of form which you can imagine.
I created lots of tutorials for WPForms, from which I share some of them below, so if you want to learn more about them, check those out.
- How to add PayPal in your forms
- How to create a multi-step form
- How to create a survey form
- How to create a donation form
- How to create a file upload form
- How to create an order form
If you only create a simple contact form, newsletter form, etc and add hCaptcha on them, then you don’t need to buy their premium version.
You can try their free version for that. But for creating advanced forms, you have to buy their premium version.
So, if you want to try their paid version, click the link below to buy it:
First, we are going to install and configure WPForms on our WordPress website. If you have already WPForms on your site, skip this step.
Step – 1. Install and configure WPForms
To install WPForms, login to your WordPress dashboard, go to Plugins > Add New and search for ‘WPForms’, then install and activate it.
If you are a paid user, then you need to follow one more step, which is to activate your paid license. Go to WPForms > Settings and paste your license key and click Connect.
Now you have successfully installed and activated WPForms.
Let’s configure WPForms for hCaptcha. For that, go to WPForms > Settings and switch to the CAPTCHA tab. Next, select hCaptcha.
Once you have selected the hCaptcha tab, a form will open up. You need to fill all the details and configure WPForms with hCaptcha.
For Site Key and Secret Key, please follow our next step.
Fail Message means when users failed to pass the test, which message you want to show them.
Sometimes CAPTCHA is loaded more than once on your site (for example, by both WPForms and your WordPress theme), this can prevent hCaptcha from working properly. If you enable No-Conflict Mode, it removes any CAPTCHA code that’s not loaded by WPForms.
Don’t enable this. However, we highly recommend getting in touch with the WPForms support team if you’re at all unsure whether to use this option.
Preview 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.
Step – 2. Generating hCaptcha keys
Second, we are going to generate keys for hCaptcha. To generate hCaptcha keys, you will need to go to hCaptcha and create your hCaptcha account.
Next, log in to your account and click the New Site button in the upper right corner to get started.
This will open up a form where you need to fill some details.
In the Add New Sitekey section, you can add a specific name to this specific site key. This is an optional option, so if you want you can do it. This is only for your reference, and will not be seen by your users on the front end.
Next, enter the name of your website where you want to use hCaptcha under the Hostnames.
Captcha difficulty allows you to choose the difficulty level of the hCaptcha within your forms.
And the last option is Filter captchas by audience interests, where you can choose up to 3 different interests that will filter what type of content will be shown in your captchas.
Once you have done it, don’t forget to save your changes.
After saving it, you will be redirected to your site key’s settings page, where you will get your keys.
Click the Settings button to view more details.
Here, you can view your full site key under the Sitekey section. Simply copy that key and paste it on your WPForms hCaptcha’s Site Key option.
Now it is time for finding the Secret Key, right? So, for that, click the Save button and then the Settings tab.
Copy your key and paste it on your Secret Key section. Now you have successfully added your hCaptcha keys on your WPForms settings.
Step – 3. Adding hCaptcha in your form
We already configured WPForms and hCaptcha, now it is time to add hCaptcha to our forms.
First, create a form using WPForms or edit your existing form.
On your form builder dashboard, drag and drop the hCaptcha field from left to right to add it to your form.
To confirm that hCaptcha is enabled, look for the badge in the upper right corner of your form builder.
Now it is time for testing our hCaptcha.
Step – 4. Test your hCaptcha
Testing is an important step to follow. After testing, we make sure that hCaptcha looks and works how you’re expecting.
To test your hCaptcha, open your form and submit an entry on your form, and test hCaptcha working or not.
Read this article to learn how to add Google reCAPTCHA in your WordPress forms using WPForms.
That’s it in this article. I hope you like it. If so then don’t forget to share it with your friend and family. For any query related to this post, feel free to comment in the comment section below.