1 year ago

#363757

test-img

noname

Symfony 4 how to create multiple forms for an array of entities the most efficient way

I have a table displaying users, users is an array of User entities which then displays details in a loop in a html table in twig.

For each row i need an editable comments field for each user, i'm not sure what the best way is to create a form for each user to be submitted individually using the form builder.

I'm assuming i would have to loop every single user and create the form and store in the array, but this would be quite inefficient.

Just looking for ideas on what the best approach for this would be.

symfony

symfony4

0 Answers

Your Answer

Accepted video resources