Content
Magento applications have a built-in contact form. On default Magento installations you can always find a link to it in the footer of the website.
If you want to add a contact form on any of the pages on your website, you can perform the following steps.
For Magento 1.x:
- Access the Magento administrator panel -> CMS -> Pages.
- Select the desired page and then click Content.
- Next, place the following code at the desired location on that page:
1
|
{{block type=‘core/template’ name=‘contactForm’ template=‘contacts/form.phtml’}}
|
For Magento 2.x:
- Access the Magento administrator panel -> Content -> Pages.
- From the drop down on the far right, pick Edit next to the desired page
- Select Content and then place the following code in the text field:
1
|
{{block class=“Magento\Contact\Block\ContactForm” name=“contactForm” template=“Magento_Contact::form.phtml”}}
|