From 1d50a132c58c8b5c7b21874e7d837859a60ea20f Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 15 Oct 2019 10:30:40 +0200 Subject: [PATCH] synchronize code example with 4.3 branch --- reference/forms/types/collection.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 #}