
To add a contact form to your Magento store you’ll need to do the following:
1) Go to CMS > Pages.
2) Create a new Contact Us page or choose the page where you’d like to embed the form.
3) On the Content tab, click the “Show / Hide Editor” button.
4) Paste the following code inside the editor:
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
For Avalanche 1.3.1 and earlier you’ll need to upload the following file to your server:
/app/design/frontend/avalanche/default/template/contacts/form.phtml
/app/design/frontend/avalanche/default/template/contacts/form.phtml
<?php /** * Avalanche for Magento 1.6+ * Designed by Fast Division (http://fastdivision.com) * * NOTICE OF LICENSE * * This source file is subject to the EULA * that is bundled with this package in the file license.txt. * It is also available through the world-wide-web at this URL: * http://fastdivision.com/legal/license.txt * * @author Fast Division * @version 1.3.1 * @copyright Copyright 2012 Fast Division * @license http://fastdivision.com/legal/license.txt */ ?> <div class="grid_12 white-box"> <h1>Contact Us</h1> <div class="white-box-inner"> <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div> <form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post" class="site-form"> <ul class="form-list"> <li class="field"> <label for="name" class="required"><?php echo Mage::helper('contacts')->__('Name') ?><em>*</em></label> <div class="input-box"> <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" /> </div> </li> <li class="field"> <label for="email" class="required"><?php echo Mage::helper('contacts')->__('Email') ?><em>*</em></label> <div class="input-box"> <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" /> </div> </li> <li class="field"> <label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label> <div class="input-box"> <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" /> </div> </li> <li class="field"> <label for="comment" class="required"><?php echo Mage::helper('contacts')->__('Message') ?><em>*</em></label><br/> <div class="input-box"> <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="50" rows="8"></textarea> </div> </li> </ul> <div class="buttons-set"> <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" /> <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="action-button"><span><?php echo Mage::helper('contacts')->__('Get In Touch') ?></span></button> </div> </form> </div> </div> <script type="text/javascript"> //<![CDATA[ var contactForm = new VarienForm('contactForm', true); //]]> </script>