Open Nek- opened 4 months ago
Did you try with LiveCollectionType ?
I changed the approach no more using a form for the collection, so I can't say it would help (but probably yes!). I was not using LiveCollectionType.
This issue is connected to https://github.com/symfony/symfony/discussions/57959 where I give some help debugging this kind of error.
I have to admit, I tried something a bit weird :) . I wanted to use a twig live component inside a collection form type. I did this because I need the field to be highly dynamic and it's dependent on another field and specific entities and... I spare you the details: it's a complicated form.
My code looks something like this:
I expected to do the hard work inside my component. But I ended up quickly with the following error:
It's related to the stimulus controller I use against it:
I think it's because the live component is built using the content of the prototype of the collection type (maybe not idk).