How to customize the data-prototype attribute in Symfony 2 forms
A bit old, but here is a deadly simple solution. The idea is simply to render the collection items through a Twig template, so you have full ability to customize the prototype that will be placed in your data-prototype=”…” tag. Just as if it was a normal, usual form. In yourMainForm.html.twig: <div id=”collectionContainer” data-prototype=” {% … Read more