Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Form (for example contact) on every pages

Started by Muut Archive 9 years ago · 4 replies · 651 views
9 years ago

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

9 years ago

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.

9 years ago

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!

9 years ago

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!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1321 9 years ago
Archive · by Muut Archive, 9 years ago
2 916 9 years ago
Archive · by Muut Archive, 9 years ago
2 4047 9 years ago
Archive · by Muut Archive, 9 years ago
1 2921 9 years ago
Archive · by Muut Archive, 9 years ago
3 1105 9 years ago