Hello,
I need to create a multistep ( same page). Does anybody have info about it ?
With plugin forms 2.0
I can include multiple forms but need to aggregate to a single email. Not sure is the right direction. Any infos about will help
Hello,
I need to create a multistep ( same page). Does anybody have info about it ?
With plugin forms 2.0
I can include multiple forms but need to aggregate to a single email. Not sure is the right direction. Any infos about will help
Your question puzzles me. Maybe we can work something out. Please regard my suggestions here as a starting point towards a solution.
Using the Add Page by Form Plugin you can pass form field values from one form (in step x) to the next as form values get transferred to a new page frontmatter where they can be used by a form on that new page (in step x+1).
To pre-fill normal or hidden fields with values entered in a previous step you could use the Form Prefiller Plugin. Actually your question was the final push that had me create it.
Although this could make for a multistep or wizard like flow it uses multiple pages and is not a single page Ajax behaviour solution. Furthermore it leaves a trail of new site pages.
But as I said maybe it’s something to build upon?
hi @bleutzinn
thanks a lot for yours suggestions. I found one solution, i create a field attribute called step
to know which field belong to step1 or 2 etc in my frontmatter
then in my custom form.html.twig
i create my multistep kind of switcher
with previous and next button (switch from step 1 to 2 for instance), it works great, all data sent in one email, last job :
as an alternative i will check Form Prefiller Plugin, seems great plugin
hey @dimitrilongo
is there any way I can take a look at your solution. I would like to understand how I can create a multistep form, but I have no Idea.
At the moment I got a modular page with multiple select fields in the backend, where I choose which field should be added in the frontend. I choose the type and add a label, which are loaded in the html tag.
was away, i will post or send PM with my solution, just validation is needed
hey @dimitrilongo
how’s the validation going?
hi guys have you managed to get this multistep form done yet ? I was thinking about the same thing now and perhaps you could help out a solution ?
thanks in advance
hi, i’m just as faulty as you, don’t know if you’ve solved it yet?
not yet but I am working on a different approach to bypass fully the Grav from and just post the JSON to an endpoint , then process and sanitize the input and then email it .
I managed to get the the POST the json, not its time to build a custom plugin that would manage the form information and email