I have a contact form in my footer which will be displayed on all pages. How do I do that? The documentation thinks that I always have one specific page responsible for the form. The form currently looks like this in twig:
<form method='POST'>
<label for='name'>{{ "o.footer.form.name"|t }}</label>
<input type='text' id='name' name='name' required='required'/>
<label for='email'>{{ "o.footer.form.email"|t }}</label>
<input type='text' id='email' name='email'/>
<label for='phone'>{{ "o.footer.form.phone"|t }}</label>
<input type='tel' id='phone' name='phone'/>
<label for='message'>{{ "o.footer.form.message"|t }}</label>
<textarea id='message' name='message'></textarea>
<input type='submit' value="{{ "o.footer.form.submit"|t }}"/>
</form>
You can do that since the latest release of Form plugin.
Just create a page with a form defined and then call it from other page, example:
{% include "forms/form.html.twig" with {form: forms( {route: '/newsletter-signup'} ) } %}
More information: https://learn.getgrav.org/forms/forms#displaying-forms-in-page-content