We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ec07f7 commit e5360fbCopy full SHA for e5360fb
cookbook/form/form_collections.rst
@@ -395,7 +395,7 @@ one example:
395
396
// Replace '$$name$$' in the prototype's HTML to
397
// instead be a number based on the current collection's length.
398
- var newForm = prototype.replace(/\$\$name\$\$/g, collectionHolder.children().length);
+ var newForm = prototype.replace(/\$\$name\$\$/g, collectionHolder.children().length - 1);
399
400
// Display the form in the page in an li, before the "Add a tag" link li
401
var $newFormLi = $('<li></li>').append(newForm);
0 commit comments