-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
https://symfony.com/doc/current/forms.html#creating-form-classes says:
Besides, forms defined in classes can be reused in multiple actions and services.
But how? What is the best practice here?
- Set up an own controller for the form, then do
{{ render(controller('App\\Controller\\...)) }}
in Twig - Or create the form in each controller (
$this->createForm(...);
), and then (maybe) set itsaction
to some central form processing controller?
I think there should be a dedicated page about this: What are the relevant questions you need to ask yourself before choosing the approach.
bizmate and a-k-holod