1

I am calling the contact form on my CMS page using this (as per this):

{{block class="Magento\Contact\Block\ContactForm"
 name="contactForm" template="Magento_Contact::form.phtml"}}

I duplicated:

/vendor/magento/module-contact/view/frontend/templates/form.phtml

and placed it in my theme folder:

app/design/frontend/[vendor]/[my Theme]/Magento_Contact/templates/form.phtml

Cleared caches but the form is still pulling from the core. Did I miss a step?

2 Answers 2

0

Answer found here: Magento2 : How to override contacts form.phtml in child theme

I need to create the contact_index_index.xml file.

0

Your Theme Path

app/design/frontend/[Vendor]/[Theme]/Magento_Contact/templates/form.phtml

Try below code in cms page

{{block class="Magento\Contact\Block\ContactForm" template="Magento_Contact::form.phtml"}} 

if not reflects changes on frontend then hit below commands and check

sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento ca:cl
sudo php bin/magento ca:fl

and also check this one How to call a PHTML file within a CMS page Magento 2?

1
  • if you want to call template in cms page then check my answer
    – Devidas
    Commented May 14, 2020 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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