Organizational Research By

Surprising Reserch Topic

magento add captcha to custom contact form

magento add captcha to custom contact form  using -'magento,customization,captcha,contact-form'

I created a new custom contact form in Magento website, I am trying to add captcha at the end of it.

I have added to app/code/core/Mage/Captcha/etc/config.xml

                    <label>Custom Contact Form</label>

And I added to app/design/frontend/base/default/layout/captcha.xml

    <reference name="customcontacts">
        <block type="core/text_list" name="">
            <block type="captcha/captcha" name="captcha">
                <reference name="head">
                    <action method="addJs"><file>mage/captcha.js</file></action>
                <action method="setFormId"><formId>customcontacts</formId></action>
                <action method="setImgWidth"><width>230</width></action>
                <action method="setImgHeight"><width>50</width></action>

And I added to my form this code:

<script type="text/javascript">

And I added this code to show the Captcha:

<div><?php echo $this->getChildHtml('captcha'); ?></div>

Then I enabled Captcha in Configuration > Customer Configuration > CAPTCHA and I choose "Custom Contact Form" then "Displaying Mode" to "Always".

But I still didn't get the Captcha at my custom form yet.

I hope I was clear


asked Oct 7, 2015 by atulpariharmca
0 votes

Related Hot Questions

2 Answers

0 votes
answered Oct 7, 2015 by deepak gupta
0 votes
answered Oct 7, 2015 by tushar2k6