You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cookbook/form/form_collections.rst
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -664,18 +664,22 @@ the relationship between the removed ``Tag`` and ``Task`` object.
664
664
Render a custom prototype
665
665
-------------------------
666
666
667
-
Most of the time the provided prototype will be sufficient for your needs and does not need to be changed.
668
-
But if you are in the situation were you need to have a complete custom prototype you can render it yourself:
667
+
Most of the time the provided prototype will be sufficient for your needs
668
+
and does not need to be changed. But if you are in the situation were
669
+
you need to have a complete custom prototype you can render it yourself:
669
670
670
671
.. code-block:: html+jinja
671
672
data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}"
672
673
673
-
The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the markup used for the prototype. This way you can not only easily structure your prototype-markup, you can
674
-
also use this markup to render the contents of the collection when it already holds items:
674
+
The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the
675
+
markup used for the prototype. This way you can not only easily structure
676
+
your prototype-markup, you can also use this markup to render the
677
+
contents of the collection when it already holds items:
675
678
676
679
.. code-block:: html+jinja
677
680
{% for task in tasks %}
678
681
{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.vars.form } %}
679
682
{% endfor %}
680
683
681
-
This makes sure the displayed items are the same as the newly inserted from the prototype.
684
+
This makes sure the displayed items are the same as the newly inserted
0 commit comments