Answer the question
In order to leave comments, you need to log in
How to edit multiple records of one Entity in one form?
I have an entity - Settings (fields var, value)
And I need to display 10 records from Settings for editing at once in one form.
How to build a form so that you can edit 10 records (var, value) and save on pressing 1 button?
Answer the question
In order to leave comments, you need to log in
Roughly speaking, output an array, there will be id, key and value. Send as a collection of objects or JSON, save to the database in a loop.
UPD.
The Symfony documentation has a standard example of how to work with collections via forms.
It seems to be here - https://symfony.com/doc/current/form/form_collecti... you can see.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question