A contact form is a must-have addition to any WordPress website, as most of you can’t ask all of your website visitors to contact you via email if they have a question. So, the easy way is to add a contact form page which allows your visitors to give feedback or send queries to your email directly. In this short guide, I’ll show you how to create a contact form with the reCAPTCHA in WordPress.
Contact Form 7 is a free, easy-to-use plugin that can do this for you. With more than 1 million active installs, it is one of the most extremely popular WordPress plugins.
From the WordPress admin dashboard, click on Plugins > Add New and then enter Contact Form 7 in the search area, you can also find it on the top of popular plugins list.
After clicking “Install now” then “Activate”, you’ll be ready to use it.
Creating a new Contact Form:
From the admin dashboard click on Contact > Add New to add a new contact form then you can edit its title in the form editor and you can also edit, add or remove fields easily by using the Form field buttons in the editor.
The form editor has also the reCAPTCHA tag generator button which allows you to include this feature in your form, and I will show you later in this post how to get your reCAPTCHA keys to use in all your forms.
After Clicking Save you can go to the next Mail tab, which allow you to set up the email, you can add the mail id of the administrator or any other email that you want to receive the submissions on.
In Message tab you can customize the messages which will be displayed, or you can use the default messages which is already written in this tab.
reCAPTCHA is a free Google service which can protect your website from spam and abuse. It uses an advanced risk analysis engine and adaptive CAPTCHAs to distinguish between human and bots then letting your valid users pass through with ease.
To have a reCAPTCHA code you must have a Google account, and register your site for API keys.
So, after you log in to your Google account, and go to your reCAPTCHA Admin panel, you’ll be able to enter your Domain name and Label, then Click Register button.
After having your API keys, go to your WordPress Admin Dashboard, click on Contact > Integration and then click Configure to enter your site key and secret key into the fields that appeared.
After Clicking Save, you’ll be able to add the reCAPTCHA to your contact forms by using the form editor tag generator, or by adding the shortcode [recaptcha] to the contact form field.
The final step is to go to your Dashboard, under the Contact > Contact Forms section you will find all your forms.
And you can add any of them to your pages by typing the shortcode of your form into your contact page.
There are many advantages of using a contact form, as it’s much safer than having emails from your users and will have fewer spams, also you can control what your visitors provide and set a certain fields for them to have only the information you need, and finally will help you to make your work more organized.