Hi guys,
one topic which I still can’t get fully my head around is about front-end forms.
I know how to setup a single form and did that successfully several times (call it setting up a contact form). Where I struggle is to setup multiple forms - not on one page - but on different pages eg. I have one specific form under ‘contact’, I have another form under ‘faqs’.
Assume following:
I got a contact page with a contact template assigned.
I renamed ‘contact.md’ to ‘form.md’ and added the form structure in the form.md file. Under my twig templates folder ‘form.html.twig’ calls
{% include "forms/form.html.twig" %}
In the Admin console I assign the ‘Form’ template to the ‘Contact’ page.
OK - all good this works. The ‘contact’ page loads the designated form and I can use the content editor for additional content.
My question is now how to assign a second form with the same principle?
Assume I have a page called ‘FAQs’ with ‘faqs.md’ file. I have a blueprint file with custom fields associated to it (faqs.yaml). And I do have a twig template setup for faqs.html.twig with a unique layout. I would like to load the FAQ template echoing the custom fields setup (I got that stage running) with below the custom blueprint fields a frontend form. Renaming faqs.md to form.md does not work for me.
What’s the best way forward from here?