diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 65add280efd..77378ad29ea 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -145,7 +145,7 @@ you need is this JavaScript code: // add-collection-widget.js jQuery(document).ready(function () { jQuery('.add-another-collection-widget').click(function (e) { - var list = jQuery(jQuery(this).attr('data-list')); + var list = jQuery(jQuery(this).attr('data-list-selector')); // Try to find the counter of the list or use the length of the list var counter = list.data('widget-counter') || list.children().length; @@ -176,7 +176,8 @@ And update the template as follows: {# store the prototype on the data-prototype attribute #}