For now I'm "unrolling" the inherited blocks chain to the place where inner forms are rendered and passing some parameters to form_row to distinguish it from regular forms. But I guess a cleaner solution for collection forms should be available. The _id_part with conjunction to type_part addressing mechanisms work great for fixed-structure forms, but here there's no use for them. What if we could combine them?
On Sep 27, 10:03 pm, Nikita <[email protected]> wrote: > Hello everyone, > > I have the following quite simple usage scenario. I have a Symfony2 > (2.0.3) form built on the basis of a simple Entity which has a one-to- > many relation to some other entities. I use collection field type to > display forms for those related entities. Everything goes ok straight > to the moment where I want to override the view. I'm using twig to > override rendering of specific blocks (suppose I want to remove sub- > form labels): > > {# hide sub-form label #} > {% for i in 0..1 %} > {% block '_uasd_pharmbundle_medicamenttype_products_0_label' %} > {% endblock %} > {% endfor %} > > The problem that arises is that block name is dynamic (0..n). I've > read the discussion about dynamic block names in twig and the > conclusion that it will bring up many problems related to validation/ > correction of such names. But what can be done in this particular > situation? Maybe collection form parts should have some unified block > name which will allow us to override all the repeating stuff at once? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
