Now the problem I’m faced with is putting the contact into the modular home page. I have read the documentation on it: http://learn.getgrav.org/advanced/forms#using-forms-in-modular-pages
I tried to follow the steps described but ended up with an empty section where the form should be. Here are the questions I have regarding the instructions:
In your theme, add a templates/modular/form.html.twig file copying templates/forms/form.html.twig.
a. Shouldn’t I edit first the form.html.twig to get rid of these lines?
b. should I copy formdata.html.twig together with forms folder from the templates folder? … inside formdata.html.twig there are references to that folder.
Create a modular folder with page type form.md
a. Need a bit of clarification on what should I understand under modular fol der. I have a modular folder 01.home should I create a folder inside this modular folder like _contact or add a form.md just near modular.md?
b. Can I just copy the single page form.md that is working in single page mode into the modular folder?
Add the form header to the main modular page, modular.md ?
a. form header, that’s from the single page form.md the from: withe name:, fields:, etc. or the whole header that is everything from form.md except the begin/end signs ---
b. Or for form header form: action: /is enough without any other property? (my modular page is the home page)
As for my results, if I put the form.md near the modular.md I will get instead of my modular page the form only. If I create a _contact folder with form.md I get the a white section that is from trying to render my form but only a little white area is all that I get instead of a form. Looking at its source I it renders my form into this:
just create a “module” of the modular page, _contact/form.md for example. That md page will not contain any form definition. It’s just an indication that this is the part that should output the form.
The modular.md page should contain the whole form definition, with fields etc, as if it was a “full-page” form.md file header. With its own path as the form.action field.
Trying to follow you, still not getting it though, I still get just a blank section in the modular page. Here are the contents of some of my related files:
I have read it, but your problem is after pressing the submit button, mine is with migrating a form from single page into a modular page and until now I don’t get not even the submit button so its quite a different issue here - definitely not an issue with updates.