I have an entity which has some number of associated entities that I must show to the user in row form each, with other data such as the associated entity's name, cost, etc. I need the user to be able to modify the quantity.
I'm displaying the table in twig, and have a FormType that shows its associated entities in a CollectionType, but cannot for the life of me figure out how to do something like this:
{{ form_row(form.child[ entity.getId ]) }}
So that the quantity edit forms can appear in their corresponding table cell and not just sit on the top of the page. Should I render the entire table using a form? In that case, I have the difficulty of then integrating additional forms e.g. delete, and also I have just read that this is discouraged.
At the same time, Twig has next to no array support, so my other solution, which would be to store each associated form in an array indexed by ID, can't be made to work either.