I have a form done in twing and I want to pass the values of this form to my database and for this I have to send to the controller, no?
I have a form done in twing and I want to pass the values of this form to my database and for this I have to send to the controller, no?
Symfony has a "private" form for working with forms.
Basically it is built into the Controller and then needs to be started in Twig.
Here's a step-by-step guide:
1 ° Create an entity to represent the fields of your form. If you already have an object to persist this data just instantiate it.
2 Create the form with the fields you want to return.
3 ° Start and manipulate the form as you wish on Twig.
There is a very clear example of how you can do this in the documentation: