Describe the bug
So, I've wanted to do a nested collection. And in page 'edit' I added CollectionField and to this field added custom Type (setEntryType()). In custom type I added CollectionType and put options [allow_add => true, allow_delete => true]
And i tried to edit row. But i noticed that in frontend when create input, it added wrong id to this input.
To Reproduce
The EasyAdmin version is 3.
1) Create crud controller and in method "configureFields" add CollectionField. To this field add setEntryType() and put custom type.
2) In the custom type in method "buildForm" add field with CollectionType and add options [allow_add => true] to look bug.
3) Open page with this form. Click F12 (to open an inspector). And click on "Add new item" and add items and one more time and one more time.
(OPTIONAL) Additional context
This is my method "configureFields" of crud controller
Sorry guys. I've found how to solve this problem. Need just add it custom type in field CollectionType a option "prototype_name". I wasted all day to solve this problem... ohhh
Describe the bug So, I've wanted to do a nested collection. And in page 'edit' I added CollectionField and to this field added custom Type (setEntryType()). In custom type I added CollectionType and put options [allow_add => true, allow_delete => true] And i tried to edit row. But i noticed that in frontend when create input, it added wrong id to this input.
To Reproduce The EasyAdmin version is 3.
1) Create crud controller and in method "configureFields" add CollectionField. To this field add setEntryType() and put custom type. 2) In the custom type in method "buildForm" add field with CollectionType and add options [allow_add => true] to look bug. 3) Open page with this form. Click F12 (to open an inspector). And click on "Add new item" and add items and one more time and one more time.
(OPTIONAL) Additional context This is my method "configureFields" of crud controller
And this is my custom type
I have entity Category that have a relation OneToMany to entity PossibleParameter that have a relation OneToMany to entity PossibleParameterValue
Screenshot from frontend with right values
And screenshot with bug
So, if you have questions ask me I have questions, how i fixed it? What method do I need to rewrite? Can you help me?