As the development of fusion-forms https://github.com/neos/fusion-form slowly comes to an end we should start to think about the next steps after and look at the topics formhandling and editable forms again.
Fusion forms will allow us to implement editable forms really easy as we already are able to handle all fields that are passed to the form as rendered html. The only missing building blocks are data-handling and the validation.
In the following i want to line out my idea how a much simpler form handling solution could work that does not need a special runtime and the complexity of the current form framework. I hope to collect some feedback to get a better understanding of the needed fetures and how-simple / complex a solution needs to be.
I have no plans to work on that in the near future unless a customer project appears. But if anyone is willing to implement this or similar things i will gladly help.
Neos Formhandling
-
In general forms should be submitted to a controller action that is responsible for validation, issuing a signal or event that other packages can listen to and finally sends a redirect to the tank you page or send the user back when validation errors occurred. No subrequests needed here.
-
There should be two different ways to define forms via settings and via nodetypes that can be installed independently of each other.
-
The form controller would perform the following steps.
- Fetch validations rules and target-uri for the submitted form (the information about the origin has to be transported safely)
- Apply validation and send the request back to the _referrer if validation errors occurred
- If the data was validated successfully submit the event/signal “form contact was submitted with data …”
- Send redirect to the thank you page
-
While such a simple approach is not able to handle multipage forms and i see no problem in that. Whenever a multipage form is really needed it either justifies a dedicated package or a frontend application to help users with direct feedback.
There are still many details unclear, it might even makes sense to reuse the existing form-finishers and but get rid of the runtime and the configuration.