Magento 2 newbie. I am trying to override the default 'Customer Account Edit' form on the Frontend. I'm not able to get my template to "override", its always loading the default template [/html/public/vendor/magento/module-customer-custom-attributes/view/frontend/templates/customer/form/edit.phtml
]. The issue may be with my layout but I'm not certain of the syntax. Using 'Vendor/Module' as an example.
My Layout File:
/html/public/app/code/Vendor/Module/view/frontend/layout/customer_account_edit.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
<body>
<referenceContainer name="customer_account">
<block class="Magento\Customer\Block\Form\Edit" name="customer_edit" template="Vendor_Module::customer/form/edit.phtml" cacheable="false"></block>
</referenceContainer>
</body>
</page>
Does anyone know if I'm using the correct reference container or if that's even the issue I'm facing?
Best Answer
Something like this should work
https://github.com/DominicWatts/EmailCC/blob/master/view/frontend/layout/customer_account_edit.xml
https://github.com/DominicWatts/EmailCC/blob/eb29ce70042d2fdc755a855c7e7b181a671a3367/view/frontend/templates/form/edit.phtml#L80
https://github.com/DominicWatts/EmailCC/blob/master/view/frontend/templates/form/email_cc.phtml