There are two ways to create contact us page.
Step1. Create a CMS page named contact us
Type the contact details as we are doing normal.
Now we want to add contact form. Add the below code.
{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}
Example is below
<div style="width:30%; float:left;margin-right:10px;">
xxx.xxx.xxx.xxxx.xxxx.
xxx.xxx.xxx.xxxx.xxxxx.
Ahmedabad-382440, Gujarat, INDIA
</div>
<div style="float:left;">
{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}
</div>
*************************************************************
Step2: Open vendor/magento/module-contact/view/frontend/templates/form.phtml
And make the changes as you desire.
Step1. Create a CMS page named contact us
Type the contact details as we are doing normal.
Now we want to add contact form. Add the below code.
{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}
Example is below
<div style="width:30%; float:left;margin-right:10px;">
xxx.xxx.xxx.xxxx.xxxx.
xxx.xxx.xxx.xxxx.xxxxx.
Ahmedabad-382440, Gujarat, INDIA
</div>
<div style="float:left;">
{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}
</div>
*************************************************************
Step2: Open vendor/magento/module-contact/view/frontend/templates/form.phtml
And make the changes as you desire.
No comments:
Post a Comment