Sign up to receive email updates and to hear what's going on with our magazine!
CAPTCHA is short for Completely Automated Public Turing Test to Tell Computers and Humans Apart. It’s used to determine whether the user on your website is human or not. The basic purpose it serves is to stop spam and prevent the website from attackers, and it does that with a simple and easy workflow.
The users have to fill the CAPTCHA with words or letters shown on screen. If the CAPTCHA is a match, the user is allowed to proceed, and if it doesn’t, then of course, you can’t proceed.
Contact form is an important part for any ecommerce store, hence, it must have an integrated CAPTCHA form to avoid spam.
Magento is a popular and powerful ecommerce platform. So today I am going to teach you how to add google reCAPTCHA on contact form in Magento.
The process of adding reCAPTCHA in Magento contact form consist of the following steps:
First, login to your gmail account, go to Google reCAPTCHA signup page, and click on SIGN UP.
Enter a label name for your site of choice, something you can remember easily, and enter your online store’s domain. After providing the details, click on Register.
Now a screen will appear from where you can get your Site and Secret Key which you will use in the configuration step of this tutorial.
Go to contacts form the reCAPTCHA page to get an extension key. Select Magento 2.0 and click on
I agree to the extension license agreement. Click on Get Extension Key and copy the extension key.
Go to the admin panel of your Magento and navigate to System → Magento Connect → Magento Connect Manager.
Now paste the reCAPTCHA Extension key in the textfield and click Install. After its installed, click on Proceed.
Go back to the admin panel and navigate to System → Configuration.
Click on Contacts under the GENERAL Tab.
Select Yes to Enable Captcha attribute. Then enter the Site Key and Secret Key of Google reCAPTCHA which we created in the first step of this tutorial. Now just save the configuration by clicking on Save Config.
Go to the contact us page of your Magento store and you will see the result!
reCAPTCHA is a smart choice to make your contact forms more secure and spam free. After following this tutorial, you should be able to add reCAPTCHA to your Magento contact forms. If you have any problems or would like to add to the discussion, just leave a comment below. And don’t forget to share this article with your friends!
Syed Muneeb Ul Hasan is an expert in PHP and Magento, he prefers to educate users in implementing and learning Magento. When not working, he loves to watch cricket.