Magento native captcha for contact form

It took ages for me to configure native captcha in contact form in Magento Enterprise
My task was to add native captcha to contact form, that is on /contacts/index/index url.

Native CAPTCHA settings

First of all find Customer Configuration and open CAPTCHA settings:


How to add new form to CAPTCHA settings?

Create new module and add this lines to config.xml:

You might found here module/observer. It is explained further.

How to show CAPTCHA in contacts form?

Find your form template and insert:

After that find layout xml for your page, for example mine was contacts.xml:

How to check CAPTCHA?

Create Observer for your module:

Keep notice that was said about config.xml:
Rename module/observer to your module name.
Rename controller_action_predispatch_routename_controller_method to your controller method. For example in my case it was controller_action_predispatch_contacts_index_index

comments powered by Disqus


Follow Me

Read Also