Do you want to get rid of the fake form submission by bots?
Have you observed that your form entries’ emails are going to spam? This is due to the fake entries by bots. To avoid such fake submission of forms reCAPTCHA has been introduced.
In my recent articles, I have discussed the WPForms, its features, and addons. WPForms is the best WordPress plugin to create the forms. We can create different types of forms in WPForms.
You can read the below articles to get an idea about WPForms.
- How To Create A Signature Form In 3 Simple Steps?
- How to Accept Payments with WPForms using Stripe Addon?
- How to Reduce Form Abandonment in WordPress?
In this article, I am going to discuss the below tutorials about how we can enable the reCAPTCHA in forms.
- By using Google reCAPTCHA
- By using WPForms custom CAPTCHA Addon
- Enable invisible reCAPTCHA in WordPress forms
- 1 Enable Google reCAPTCHA in WordPress forms
- 2 WPForms Custom Captcha Addon
- 3 Enable Invisible reCAPTCHA
Enable Google reCAPTCHA in WordPress forms
In this tutorial, you will learn to enable the reCAPTCHA checkbox to your WordPress forms.
Create the simple form
The first step is to install and activate the WPForms WordPress plugin. Once you activate the plugin you will have to create the simple form. I have written a step by step guide for creating the forms using WPForms. Please go through the below guide
The next step is to configure the reCAPTCHA setting for your forms, to do so navigate to WPForms » Settings » reCAPTCHA
Select the checkbox reCAPTCHA v2
Basically, reCAPTCHA is a service provided by Google, so in order to use this service in our product, we need site key and secret key. You can use the below link to generate the keys
Once you visit the above site, click on the Admin console from the top right corner.
You will be redirected to the Google account sign in, do it and then you will see the site registration screen for reCAPTCHA.
Click on the plus sign(+) to register your site and enter the Label name as site URL so that we can easily identify on which site we have activated the reCAPTCHA feature.
Then choose the reCAPTCHA you want to add to your site, here we have to choose the reCAPTCHA v2 and “I’m not a robot” Checkbox.
After that, you have to add the domain name, email address and click on submit.
Once you submit you will get the confirmation message and also site key and secret key.
Copy the site and secret key and open the WPForms setting WPForms » Settings, paste the site key, secret key and save all settings.
The next step is to add the reCAPTCHA in WordPress forms.
Add reCAPTCHA to forms
In the first step we have created the simple form using WPForms, here we are going to add the reCAPTCHA to that form. We have already registered our site to Google reCAPTCHA in the second step.
To enable reCAPTCHA, navigate to Settings » General in the form editor which you have created.
In a general setting, you will see the option Enable Google Checkbox v2 reCAPTCHA.
Check the box and save the settings.
Add form with reCAPTCHA to WordPress
Now the final step is to add the form to your WordPress if you have created contact form then go to the contact page and you will see the WPForms icon.
If you don’t see the icon, then click on the add block icon and search for WPForms, you will get the icon, click on it and choose your form.
Once you publish your page you will see the form with reCAPTCHA feature
WPForms Custom Captcha Addon
In the above tutorial, we have used Google reCAPTCHA to enable security to our forms. Suppose we don’t want to use the Google reCAPTCHA then you can use the WPForms custom CAPTCHA addon. You can use the custom questions or use the math question to avoid spam submitting of forms.
In this guide, you will learn to enable the custom CAPTCHA addon to WPForms and add an extra layer of security using CAPTCHA.
Create the simple form
As discussed in the above tutorial, you can create a simple form using the WPForms, here is the guide
and next, go to WPForms » Addons and install the Custom Captcha Addon.
NOTE- To install the Custom Captcha Addon you must have at least one premium plan of WPForms.
Add and Customize Captcha Form Field
Once you create the sample form, we have to add the Captcha form field in it. In the form builder just drag and drop the CAPTCHA field.
The CAPTCHA field will display the random math question by default before submitting the form.
We can customize the Captcha field, just click on it and you will see the customization screen. Here, you can change the Label, type of the Captcha and description of it.
If you change the type of CAPTCHA as a question and answer, you will have to add your own questions and answers.
You can add multiple questions and answers so that when the user refreshes the page, they will have to face new questions each type.
Once all your customization is done, you can save all the settings. The last step is to add the form to WordPress.
You can refer to the above tutorial’s step 4 to add the form to WordPress.
Enable Invisible reCAPTCHA
We can add the invisible reCAPTCHA to your WordPress form using the WPForms plugin.
Create a simple contact form
We have to create the simple contact form first, here is the guide you can refer to.
Configure reCAPTCHA settings
Next step is to configure the reCAPTCHA, navigate to WPForms » Settings » reCAPTCHA and select the invisible reCAPTCHA v2
Again, we have to generate the site and secret key using Google since the reCAPTCHA is the Google product. You can use the below link to generate the keys.
When you click the above link you will be redirected to the Google page and click on the Admin console from the top right corner.
You will ask for the Google account sign in and once you sign in the account you will get the option to register your site for reCAPTCHA, if you have already registered the site, you can see all the history there.
Now, click on the + sign to register the new site
Now, you will ask for the Label name, you can enter the website URL to identify on what site we have activated the reCAPTCHA.
Once you have done this, you will have to choose the reCAPTCHA v2 option and since we want to enable the invisible reCAPTCHA, choose the invisible reCAPTCHA badge.
Finally, you need to add the website URL and submit the form, you will get the site and secret key.
Once you copied the site and secret key, paste it in the WPForms settings where we have enables the invisible reCPATCHA (refer below snapshot)
Enable the invisible reCAPTCHA in forms
Now, we have already registered our site to invisible reCAPTCHA, now its time to integrate that with WordPress forms.
To enable it to go to Settings » General in the form editor and click on the Enable Google invisible v2 reCAPTCHA.
That’s all, now you just have to add the form to your page. I have explained this in the first tutorial’s step 4, please follow the guide and add the form to your desired page.
In this way, you can enable the reCAPTCHA to your forms and enable the extra layer of security and get rid of spam form submission.
If you like the above article then share it with your friends.
Latest posts by Amit Kharbade (see all)
- How to Skyrocket Email Marketing With Sendinblue and WPForms? - February 17, 2021
- How to Boost Your Conversions with Mobile Exit-Intent On OptinMonster? - February 11, 2021
- 2021: New Year Resolution For Professional Bloggers - February 7, 2021