Hi,
Is there a way to define a form that will be displayed on all frontend pages? I do not want to define it within the page but individually. I tried to insert the YAML definition into user/blueprints/forms/contact.yaml and then call it from the template using {% include "forms/form.html.twig" with { form: forms('blueprints/forms/contact') } %} - but it does not lead to the result
If you are familiar with Gantry maybe this will help :
Have you tried to put it in Gantry and module position?
And make assignment on all pages.
I use to do it in RocketTheme's Gantry in Joomla, and it works like a charm every time.
That's what I wanted to avoid. Gantry belongs to the world of CMS fatheads like Joomla, WordPress, Drupal ... I like much Grav because it's super slim. But thanks for your help!
@fosil almost there, but you cannot add a form to a blueprint, you need to define it in a page header. See Displaying Forms from Twig
I was not able to "reach" the form from another site, but the solution is apparently in the line {% include "forms/form.html.twig" with { form: forms( {route:'/forms/contact'} ) } %} from the link. Thanks!
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1323 | 9 years ago | ||
| 2 | 919 | 9 years ago | ||
| 2 | 4048 | 9 years ago | ||
| 1 | 2923 | 9 years ago | ||
| 3 | 1106 | 9 years ago |