I need to add contact-us form in the custom place of page.html.twig file in my themplate, I want to add some code like belove:

<div class="Contact-Us">
    <p>Contact Us</p>
    <form action="#" method="post">
        <input type="text" name="email" placeholder="Email" />
        <textarea name="message" placeholder="Message"></textarea>

1 Answer 1


You can do this in four steps:

  1. Build a contact form.
  2. Put this contact form in a block with Contact Block.
  3. In block layout put the block in a region -> myregion.
  4. Place the region in page.html.twig -> {{ page.myregion }}

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