0

What is the recommended way to override the contact .phtml template. All I want to do is add HTML tags around the form so I can use bootstrap to give it a nice layout.

As far as I know there is no way to call the contact form in my contact-info page using something like {{block class="..." template="..."}}

So I tried to add the additional HTML code around the form in the .phtml thats being loaded on the contact page. What I've done is creating a form.phtml file in the path below as some answers on SO told me to:

app/design/frontend/VENDOR/THEME/Magento_Contact/view/frontend/templates/form.phtml

Besides that form.phtml the Magento_Contact folder is empty. Am I missing something?

| improve this question | | | | |
0

Wrong file place :

app/design/frontend/VENDOR/THEME/Magento_Contact/view/frontend/templates/form.phtml

Should be

app/design/frontend/VENDOR/THEME/Magento_Contact/templates/form.phtml
| improve this answer | | | | |
0

I think following thread can help you.

Unable to overwrite Contact Form in Magento 2

In this, sample module is used to achieve it.

| improve this answer | | | | |
  • That seems a little bit too much for only changing the form layout. The reason why my override didn't work is because I had the wrong path, see answer. – creativename May 8 '17 at 14:48

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.