0

This question already has an answer here:

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>
        <button>Send</button>
    </form>
</div>

marked as duplicate by Pierre.Vriens, Scott Joudry, No Sssweat, Adrian Cid Almaguer, Krishna Mohan May 18 '16 at 15:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.