0

I have referred below link to implement captcha in contact us page.

How to implement Magento Captcha in Contact- Us form?

The above code is working well even captcha is showing on contact us page.

I am also using contact form in the footer of the website.

The code is like below.

<div class="contact-block-footer footer-col last" id="contactFormFooter">
<h4><?php echo Mage::helper('contacts')->__('Contact form') ?></h4>
<form action="<?php echo $this->getUrl('') ?>contacts/index/post/" method="post">
    <div class="fieldset footer-col-content">
        <ul class="form-list">
            <li class="fields">
                <div class="field">
                    <div class="input-box">
                        <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" placeholder="<?php echo Mage::helper('contacts')->__('Name:') ?>"/>
                    </div>
                </div>
                <div class="field">
                    <div class="input-box">
                        <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" placeholder="<?php echo Mage::helper('contacts')->__('Email:') ?>" />
                    </div>
                </div>
                <div class="field">
                    <div class="input-box">
                        <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Message') ?>" class="required-entry input-text" cols="5" rows="3" placeholder="<?php echo Mage::helper('contacts')->__('Message:') ?>"></textarea>
                    </div>
                </div>
            </li>
            <?php echo $this->getChildHtml('form.additional.info'); ?>
        </ul>
        <div class="buttons-set-footer">
            <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
            <button type="submit" title="<?php echo Mage::helper('contacts')->__('Send') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Send') ?></span></span></button>
        </div>
       </div>
   </form>
</div>

<script type="text/javascript">
  //<![CDATA[
    var contactFormFooter = new VarienForm('contactFormFooter', true);
    //]]>
</script>

I need to show captcha in this form also, Is there any possibility to show the captcha in the contact form i used in the footer?

Can anyone help me how to implement this one.

Thanks!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.