Permalink
Browse files

feature #3875 Added a note about customizing a form with more than on…

…e template (javiereguiluz)

This PR was merged into the 2.3 branch.

Discussion
----------

Added a note about customizing a form with more than one template

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes
| Applies to    | 2.3+
| Fixed tickets | #3643

Commits
-------

ce14104 Fixed a minor grammar mistake
1b386ff Fixed a minor error
08d26ee Removed the old syntax and left just the "with" keyword syntax
94625c5 Fixed minor formatting issue
6621720 Minor formatting improvement
2b0213b Added a note about customizing a form with more than one template
  • Loading branch information...
weaverryan committed Jul 11, 2014
2 parents a3fe74f + ce14104 commit eae9ad037ed402752238e4eb1c9c0b2fdc443d7d
Showing with 16 additions and 0 deletions.
  1. +16 −0 cookbook/form/form_customization.rst
@@ -298,6 +298,22 @@ When the ``form.age`` widget is rendered, Symfony will use the ``integer_widget`
block from the new template and the ``input`` tag will be wrapped in the
``div`` element specified in the customized block.
Multiple Templates
..................
A form can also be customized by applying several templates. To do this, pass the
name of all the templates as an array using the ``with`` keyword:
.. code-block:: html+jinja
{% form_theme form with ['::common.html.twig', ':Form:fields.html.twig',
'AcmeDemoBundle:Form:fields.html.twig'] %}
{# ... #}
The templates can be located at different bundles and they can even be stored
at the global ``app/Resources/views/`` directory.
Child Forms
...........

0 comments on commit eae9ad0

Please sign in to comment.