From 6e0600fd58b6ce84d22e0fb571005b8db57a8f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kub=C3=A1nka=20P=C3=A9ter?= Date: Sat, 17 May 2014 00:40:55 +0200 Subject: [PATCH] remove tag don't work correctly If you remove a tag and then add a tag, the removed one will be changed, if we add "new_" prefix, it will work fine. I think its need a little more explain in the doc, but my english is poor. --- cookbook/form/form_collections.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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