Currently the only way to submit a form via Statamic is through the FormController.
This handles everything we needed - validation, storing assets, submissions and emails - it's all there. Awesome.
But if you wanted to have a Livewire form, or an API form submit, or an Inertia frontend, you need to copy a lot of code to just submit a form.
Every form submission - regardless of the front end, Livewire, an API - needs these things: validation, storing assets, submissions, and hooking in to emails for submissions as per the form config.
It would be stellar to have this behaviour abstracted out of the FormController so that it can be trivially used by developers to hook in to the forms ecosystem for their way of working, be that their own API, Livewire, Inertia, even in a manual controller they may be making - could even allow CP-based add ons to create form submissions.
Finding a way to cleanly take this behaviour and make it reusable would be an incredible feature, and help the ecosystem by centralising all of the form logic and behaviour in one place.
Currently the only way to submit a form via Statamic is through the FormController.
This handles everything we needed - validation, storing assets, submissions and emails - it's all there. Awesome.
But if you wanted to have a Livewire form, or an API form submit, or an Inertia frontend, you need to copy a lot of code to just submit a form.
Every form submission - regardless of the front end, Livewire, an API - needs these things: validation, storing assets, submissions, and hooking in to emails for submissions as per the form config.
It would be stellar to have this behaviour abstracted out of the FormController so that it can be trivially used by developers to hook in to the forms ecosystem for their way of working, be that their own API, Livewire, Inertia, even in a manual controller they may be making - could even allow CP-based add ons to create form submissions.
Finding a way to cleanly take this behaviour and make it reusable would be an incredible feature, and help the ecosystem by centralising all of the form logic and behaviour in one place.