File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments