Skip to content

Commit 4590c01

Browse files
author
daFish
committed
Added twig-syntax for data-prototype.
1 parent 2e1488e commit 4590c01

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cookbook/form/form_collections.rst

+5
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)