opened
horlyk
username_0
There is a problem for the nested collections when the **Add** button stops working.

My case: I have a main entity **A**. This entity should contain a collection of entities **B**. Entity **B** should contain a collection of entities **C**. **Add** button works well for adding new entities **B**, but for **C** it stops working.

I've adjusted JS to work with any level of nesting collections.

PS: there is one more bug with `prototype_name` option. If you leave it as a default `__name__`, the script will work not correctly. For example: `entity[__name__]colletionItem[__name__]field`, will be replaced for both, even though it should be replaced only for the first or the second.
Fixed form-type-collection script for nested collections
issue
created
horlyk
username_0
There is an issue on edit form. Will try to fix.
comment
created
horlyk
username_0
Fixed in a quick way. Actually, to achieve better results, add button and a collection itself should have some relation. Current code is not flexible enough :(
comment
created
javiereguiluz
username_1
Thanks for fixing this bug! Sadly the form collections and the JS code is a bit weak, but thanks to your improvements and future changes we might do, this will improve. Thanks!
comment