From d015c96640903093ae003b4a368c950d3b919cb0 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Wed, 30 Dec 2020 15:13:50 +0100 Subject: [PATCH] Rewording As a separate PR, as recommended by https://github.com/symfony/symfony-docs/pull/13450#issuecomment-722413038 Note: `addTagForm` was the wrong function name, it's now called `addFormToCollection()` --- form/form_collections.rst | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/form/form_collections.rst b/form/form_collections.rst index e7502432a16..0812c2dac93 100644 --- a/form/form_collections.rst +++ b/form/form_collections.rst @@ -304,14 +304,10 @@ button so you can add a new tag form (``addFormToCollection()`` will be show nex }) }); -The ``addTagForm()`` function's job will be to use the ``data-prototype`` attribute -to dynamically add a new form when this link is clicked. The ``data-prototype`` -HTML contains the tag ``text`` input element with a name of ``task[tags][__name__][name]`` -and id of ``task_tags___name___name``. The ``__name__`` is a little "placeholder", -which you'll replace with a unique, incrementing number (e.g. ``task[tags][3][name]``). - -The actual code needed to make this all work can vary quite a bit, but here's -one example: +The ``data-prototype`` HTML contains the tag's ``text`` input element with a name of +``task[tags][__name__][name]`` and id of ``task_tags___name___name``. The ``__name__`` +part is a "placeholder", which is replaced by a unique, incrementing number +(e.g. ``task[tags][3][name]``). .. code-block:: javascript