This website version is not maintained anymore
Up to date documentation is available in Symfony 3.x website (see the dropdown menu above).
Use init_with_n_elements
option to ensure that your collection will be initialized with the given number of arguments.
Code used:
<script type="text/javascript"> // // Form is initialized without any element, but 5 empty elements // are created at startup. // $('.form-collection').collection({ init_with_n_elements: 5 }); </script>