From bdd8325180021675015cb16f6803ff39cbff5e00 Mon Sep 17 00:00:00 2001 From: kshishkin Date: Sat, 20 Sep 2014 14:46:32 +0200 Subject: [PATCH 1/2] Adder and remover sidenote | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | none There are cases when you only want either adder or remover, important to know both of them need to be found if any is to work. --- cookbook/form/form_collections.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 6871be7cdab..58383fd9f7f 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -462,7 +462,8 @@ these new ``Tag`` objects easier (especially if you're using Doctrine, which we talk about next!). .. caution:: - + Create **both** methods, otherwise none of them will be used. + If no ``addTag`` **and** ``removeTag`` method is found, the form will still use ``setTag`` even if ``by_reference`` is ``false``. You'll learn more about the ``removeTag`` method later in this article. From 59b932dbedf841466dbde85f9d8a39a75c1fe9ea Mon Sep 17 00:00:00 2001 From: kshishkin Date: Sun, 21 Sep 2014 20:23:11 +0200 Subject: [PATCH 2/2] Merging emphasized notes Merged both notes into one, in accordance to discussion feedback. --- cookbook/form/form_collections.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index 58383fd9f7f..c848387f035 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -462,11 +462,10 @@ these new ``Tag`` objects easier (especially if you're using Doctrine, which we talk about next!). .. caution:: - Create **both** methods, otherwise none of them will be used. - - If no ``addTag`` **and** ``removeTag`` method is found, the form will - still use ``setTag`` even if ``by_reference`` is ``false``. You'll learn - more about the ``removeTag`` method later in this article. + + You have to create **both** ``addTag`` and ``removeTag`` methods, + otherwise the form will still use ``setTag`` even if ``by_reference`` is ``false``. + You'll learn more about the ``removeTag`` method later in this article. .. sidebar:: Doctrine: Cascading Relations and saving the "Inverse" side