From d2b7cee34a555cab0312f2c9941641cf85d60cc4 Mon Sep 17 00:00:00 2001 From: David ALLIX Date: Tue, 17 Apr 2018 18:44:57 +0200 Subject: [PATCH] Add @a2lix/symfony-collection solution --- form/form_collections.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/form/form_collections.rst b/form/form_collections.rst index 6453e791a09..17d2b2142e8 100644 --- a/form/form_collections.rst +++ b/form/form_collections.rst @@ -619,7 +619,7 @@ Template Modifications The ``allow_delete`` option means that if an item of a collection isn't sent on submission, the related data is removed from the collection -on the server. In order for this to work in an HTML form, you must remove +on the server. In order for this to work in an HTML form, you must remove the DOM element for the collection item to be removed, before submitting the form. @@ -747,13 +747,17 @@ the relationship between the removed ``Tag`` and ``Task`` object. updated (whether you're adding new tags or removing existing tags) on each Tag object itself. -.. sidebar:: Form collection jQuery plugin +.. sidebar:: Form collection external solutions - The jQuery plugin `symfony-collection`_ helps with ``collection`` form elements, - by providing the JavaScript functionality needed to add, edit and delete - elements of the collection. More advanced functionality like moving or duplicating - an element in the collection and customizing the buttons is also possible. + The package `@a2lix/symfony-collection`_ helps with ``collection`` form elements, + by providing to modern browsers the Javascript functionality needed to add, edit and delete + elements of the collection. + + If you want to use jQuery, there is a jQuery extension, `symfony-collection`_ with + more advanced functionality like moving or duplicating an element in the collection + and customizing the buttons is also possible. .. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html .. _`JSFiddle`: http://jsfiddle.net/847Kf/4/ +.. _`@a2lix/symfony-collection`: https://github.com/a2lix/symfony-collection .. _`symfony-collection`: https://github.com/ninsuo/symfony-collection