diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 27ab0bc74db..f65c2f33c7c 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -363,7 +363,7 @@ will be show next): // count the current form inputs we have (e.g. 2), use that as the new // index when inserting a new item (e.g. 2) - $collectionHolder.data('index', $collectionHolder.find(':input').length); + $collectionHolder.data('index', 'new_' + $collectionHolder.find(':input').length); $addTagLink.on('click', function(e) { // prevent the link from creating a "#" on the URL