I'm trying to add the contact form to my CMS page. I can add

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

as indicated on this post but it doesn't load the form.additional.info part of the contact form.

I need that for the Re-Captcha form to show. The form.phtml does include a call to the additional info block <?php echo $block->getChildHtml('form.additional.info'); ?> but it doesn't render.

Magento's default layout for the contact us page looks like this

        <referenceContainer name="content">
            <block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml">
                <container name="form.additional.info" label="Form Additional Info"/>

But I can't figure out how to get the <container name="form.additional.info" label="Form Additional Info"/> into the CMS page through the layout updates XMl field.

  • Do you want to add any content to contact cms page rather than contact form? If yes then where to do you want to show the contact form after/before the cms content? – Sukumar Gorai Jun 11 '19 at 15:11
  • The contact form is in the middle of my content – Haim Jun 11 '19 at 15:22
  • did you added the receptcha code on your contact form.phtml? If yes, your code will work as it is. – Oscprofessionals Jun 12 '19 at 14:22
  • I'm not using my form - I'm using Magento's and in 2.3.1 it's included – Haim Jun 12 '19 at 14:40
  • Could you solve it? – Hannes Schneidermayer Jun 4 at 17:14

Your Answer

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

Browse other questions tagged or ask your own question.