Thursday 1 May 2014

Add Magento contact form to any CMS page as a static block

Add the Magento contact form to a CMS page as a static block


Magento has a built-in contact form . You may for example want to add your company address, contact details or even a Google Map. This can quite easily be done by creating a CMS page and including the contact form portion of the standard Magento contact form as a static block.
To achieve this, do the following:
1. Create your CMS page (Admin > Manage Pages)
2. Paste the following HTML where you would like the contact form to be positioned in your CMS page:
{{block type="core/template" name="contactForm" 
form_action="/contacts/index/post" template="contacts/form.phtml"}}