Skip to content

Commit 3f6fdd7

Browse files
daFishxabbuh
daFish
authored andcommitted
Added twig-syntax for data-prototype.
1 parent da88cb5 commit 3f6fdd7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cookbook/form/form_collections.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,5 +803,10 @@ contents of the collection when it already holds items:
803803
This makes sure the displayed items are the same as the newly inserted
804804
from the prototype.
805805

806+
But if you are in the situation were you need to have a complete custom prototype you can render it yourself:
807+
808+
.. code-block:: html+jinja
809+
data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task:prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}"
810+
806811
.. _`Owning Side and Inverse Side`: http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html
807812
.. _`JSFiddle`: http://jsfiddle.net/847Kf/4/

0 commit comments

Comments
 (0)