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-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -737,19 +737,22 @@ the relationship between the removed ``Tag`` and ``Task`` object.
737
737
Render a custom prototype
738
738
-------------------------
739
739
740
-
Most of the time the provided prototype will be sufficient for your needs and does not need to be changed.
741
-
Should you need to render a prototype for your own specific needs a
742
-
But if you are in the situation were you need to have a complete custom prototype you can render it yourself:
740
+
Most of the time the provided prototype will be sufficient for your needs
741
+
and does not need to be changed. But if you are in the situation were
742
+
you need to have a complete custom prototype you can render it yourself:
743
743
744
744
.. code-block:: html+jinja
745
745
data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}"
746
746
747
-
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
748
-
also use this markup to render the contents of the collection when it already holds items:
747
+
The included `AcmeTaskBundle:Task:prototypeTask.html.twig` contains the
748
+
markup used for the prototype. This way you can not only easily structure
749
+
your prototype-markup, you can also use this markup to render the
750
+
contents of the collection when it already holds items:
749
751
750
752
.. code-block:: html+jinja
751
753
{% for task in tasks %}
752
754
{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.vars.form } %}
753
755
{% endfor %}
754
756
755
-
This makes sure the displayed items are the same as the newly inserted from the prototype.
757
+
This makes sure the displayed items are the same as the newly inserted
0 commit comments