Home > Magento, Magento Tutorials > Magento – Add CAPTCHA to contact form

Magento – Add CAPTCHA to contact form

Posted on: 8th Jan 2010 By: Adam Moss 17 Comments

RecaptchaThe Fontis reCAPTCHA extension for Magento is a great way of adding protection to the contact form you are provided for your e-commerce shop. Those familiar with reCAPTCHA will know that it isn’t the best captcha program available on the Internet as it is sometimes frustratingly difficult to read, and the soundbyte is a complete waste of time. However, the spam protection that it provides makes it very worthwhile. The steps to install it are simple:

1. Copy the extension key from: http://www.magentocommerce.com/extension/1169 and paste it into Magento Connect Manager.

2.  Logout and then log back in to your Magento Admin panel. Go to System > Configuration > Recaptcha. Here you’ll find that you require an Public Key and Private Key.

3. You’ll now need to sign up for a reCAPTCHA account. You need to do this for each domain you want to add the captcha form to. Once done you’ll be provided with the Public and Private Key that you require, then you can simply copy and paste it into the fields in your Magento admin panel. You can now set the extension to ‘Enabled’.

4. You’ll find that your existing form on /contacts has been replaced by the Fontis one in:

app/design/frontend/default/default/fontis/recaptcha

5. You can choose between several different themes or customise your own which is a nice touch. As it’s open source, you can remove elements that you don’t want. For example if you don’t like the sound function you can completely remove it. You can find more information about the extension on the official Fontis extension page: http://www.fontis.com.au/magento/extension/recaptcha

17 Responses to “ Magento – Add CAPTCHA to contact form ”

  1. Lloyd Hazlett
    #1 | 12th January 2010

    Thanks a lot for the mention, glad you’re finding the extension useful. Definitely agree that the audio challenge is unfortunately quite difficult to make out, but without it, the risk is that the resource will be made inaccessible to visually impaired users. Hopefully the quality of the audio can be improved in future so that accessibility is improved.

    For users who manage a number of domains, it’s convenient to sign up for a global key which will allow reCAPTCHA to be used on any domain. You can do this by ticking the “Enable this key on all domains (global key)” when creating your key.

    Just to clarify, the path to the overridden forms should be “app/design/frontend/default/default/fontis/recaptcha”, and these templates should copied from there to “your_theme” if using a custom design.

  2. Louise
    #2 | 19th January 2010

    An excellennt resource, extremely useful for Magento, thanks for sharing.

  3. john | Magento Developer
    #3 | 14th February 2010

    cool extension! thanks for sharing.

  4. Magento Development
    #4 | 30th March 2010

    Nice Extension for Magento. Thank your for sharing it. It save my time to create new Captche for Magento.

  5. David
    #5 | 5th August 2010

    thanks, very useful.

  6. Wardworth
    #6 | 20th August 2010

    Works a treat. Excellent! Thanks a lot.

  7. Nirmik
    #7 | 10th September 2010

    It is Very useful.

    Thanks

  8. Outsource Magento Development
    #8 | 22nd September 2010

    We have developed another stand alone free captcha module inspired by fontis recptcha.You can check it at http://www.magentocommerce.com/magento-connect/osol/extension/4001/outsourceonline_captcha

  9. thegreat
    #9 | 30th September 2010

    thanks a lot.

  10. open source consulting, system integration
    #10 | 4th December 2010

    really good extension for magento and thankful to you for sharing that. it’s save time for any captcha code in magento.

  11. Brian
    #11 | 4th December 2010

    this is a great mod. Thanks!

    NOTE:
    We had copied the Contact Us Form into a static block and then put it on our Email Us, Shipping Questions, Product Questions, etc pages.

    To get these contact forms to work with this plug in, we turned off the Contact Us Form option in System – Config – Recaptcha – Recaptcha Controls

    And then, in the contact us code that we had pasted into the static block, we changed the code from:

    to:

  12. Brian
    #12 | 4th December 2010

    The code didn’t appear to post….

    Here is it again…

    From:

    form id=”contactForm” method=”post” action=”hxxp://www.website.com/contacts/index/post/”

    to:

    form id=”contactForm” method=”post” action=”hxxp://www.website.com/recaptcha/contacts/post/”

  13. Irina
    #13 | 4th April 2011

    Thanks very much for that! It works fine on my new website now :) .

    Thanks once again!

  14. divine_ninja
    #14 | 10th August 2011

    Thanks a Lot. . . this post is very helpful.

  15. Eric
    #15 | 25th October 2011

    I have added the stock contact form to a CMS page with other contact details as a way to spruce up the contact form. Now I was able to install this Recaptcha extension with no issues, but it won’t appear on the CMS page. The user Brian above had a suggestion for changing the code, but the code is different for his block than it was for my CMS page. I used this code:

    {{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}

    How would I edit that code to make this extension appear properly on a CMS page?

  16. Ramesh
    #16 | 2nd January 2012

    When i click System > Configuration > Recaptcha . i am getting 404 error . please help me

  17. Frank
    #17 | 13th January 2012

    If you get a 404 error, just exit the admin panel and log back in.

Post A Comment

Your comments:
Enclose code snippets within the appropriate tags: [php][/php]   [js][/js]   [xml][/xml]   [css][/css]   [html][/html]
E.g: [php]<?php echo "hello world"; ?>[/php]

Search Blog

Archives

For the record...

Views & opinions in this blog are those of the individual and do not necessarily reflect those of E-commerce Web Design or the Creare Group.