10000 Tweak · symfony/symfony-docs@e66095e · GitHub
[go: up one dir, main page]

Skip to content

Commit e66095e

Browse files
committed
Tweak
1 parent 0e1fc2f commit e66095e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

form/form_collections.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,11 @@ functionality with JavaScript:
304304
})
305305
});
306306
307-
The ``data-prototype`` HTML contains the tag's ``text`` input element with a name of
308-
``task[tags][__name__][name]`` and id of ``task_tags___name___name``. The ``__name__``
309-
part is a "placeholder", which is replaced by a unique, incrementing number
310-
(e.g. ``task[tags][3][name]``).
307+
The ``addFormToCollection()`` function's job will be to use the ``data-prototype``
308+
attribute to dynamically add a new form when this link is clicked. The ``data-prototype``
309+
HTML contains the tag's ``text`` input element with a name of ``task[tags][__name__][name]``
310+
and id of ``task_tags___name___name``. The ``__name__`` is a placeholder, which
311+
you'll replace with a unique, incrementing number (e.g. ``task[tags][3][name]``):
311312

312313
.. code-block:: javascript
313314

0 commit comments

Comments
 (0)
0