Skip to content

Commit c008733

Browse files
committed
minor #4399 Explain form() and form_widget() in form customization (oopsFrogs, WouterJ)
This PR was merged into the 2.3 branch. Discussion ---------- Explain form() and form_widget() in form customization Continues #4365 | Q | A | --- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - Original PR description: > In the Form chapter of Book for Symfony 2.3, we use `{{ form(form) }}` to render the entire form ( in contrast to `{{ form_widget(form) }}` for older version of Symfony ). so maybe it should use `{{ form(form) }}` here for consistency. Commits ------- 0086c5e Applied suggestion by Ryan d653ff4 Update form_customization.rst
2 parents 2139754 + 0086c5e commit c008733

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cookbook/form/form_customization.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,19 @@ just one line:
6767

6868
.. code-block:: jinja
6969
70+
{# renders all fields #}
7071
{{ form_widget(form) }}
7172
73+
{# renders all fields *and* the form start and end tags #}
74+
{{ form(form) }}
75+
7276
.. code-block:: php
7377
74-
<?php echo $view['form']->widget($form); ?>
78+
<!-- renders all fields -->
79+
<?php echo $view['form']->widget($form) ?>
80+
81+
<!-- renders all fields *and* the form start and end tags -->
82+
<?php echo $view['form']->form($form) ?>
7583
7684
The remainder of this recipe will explain how every part of the form's markup
7785
can be modified at several different levels. For more information about form

0 commit comments

Comments
 (0)