Skip to content

Commit 4d76f62

Browse files
Rephrasing data-prototype paragraph
1 parent 95f5cc1 commit 4d76f62

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

form/form_collections.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,16 +269,14 @@ add the ``allow_add`` option to your collection field::
269269
]);
270270
}
271271

272-
In addition to telling the field to accept any number of submitted objects, the
273-
``allow_add`` also makes a *"prototype"* variable available to you. This "prototype"
274-
is a little "template" that contains all the HTML to be able to render any
275-
new "tag" forms. To render it, make the following change to your template:
272+
The ``allow_add`` option also makes a ``prototype`` variable available to you.
273+
This "prototype" is a little "template" that contains all the HTML needed to
274+
dynamically create any new "tag" forms with JavaScript. To render the prototype, add
275+
the following ``data-prototype`` attribute to the existing ``<ul>`` in your template:
276276

277277
.. code-block:: html+twig
278278

279279
<ul class="tags" data-prototype="{{ form_widget(form.tags.vars.prototype)|e('html_attr') }}">
280-
...
281-
</ul>
282280

283281
.. note::
284282

0 commit comments

Comments
 (0)