Add captcha in Magento customer registration form

recaptcha236How to add captcha in Magento ?

ReCaptcha is one of the popular captcha plugins to protect our SITE from Spam registrations. Latest Versions of magento has a native captcha support, However for older versions of magento there are some community modules available for captcha, but their scope is limited to contact form. For Customer register page there is no free modules available, so i decided to write a simple module that supports Re captcha in customer account page.

What are the Prerequisites ?

  1. Before creating the module, you must signup for the recaptcha keys on Google for your own website.
  2. recaptcha library file needs to be downloaded and placed in lib/reCaptcha/recaptchalib.php

Steps to Implement

Step 1:

We begin with our module configuration file config.xml. Here we override the customer Account controller with our sub class. This is required for adding a new template file and also add our captcha related stuff.

Step 2:

Now we need to create our Controller which overrides the customer account controller. Here we include the re captcha related stuff in our custom .phtml file.

Step 3:

Create a new register.phtml template for adding the captcha. Place the file in

Step 4:

Finally we need to place our module activation file in

Final Output:


Compatability: Magento 1.4, 1.5

Note: This is simply a QUICK Fix module for demonstration and not TESTED extensively.

Leave a Comment

Your email address will not be published. Required fields are marked *