Skip to content

Commit

Permalink
minor #4399 Explain form() and form_widget() in form customization (o…
Browse files Browse the repository at this point in the history
…opsFrogs, 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
  • Loading branch information
weaverryan committed Nov 20, 2014
2 parents 2139754 + 0086c5e commit c008733
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cookbook/form/form_customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,19 @@ just one line:

.. code-block:: jinja
{# renders all fields #}
{{ form_widget(form) }}
{# renders all fields *and* the form start and end tags #}
{{ form(form) }}
.. code-block:: php
<?php echo $view['form']->widget($form); ?>
<!-- renders all fields -->
<?php echo $view['form']->widget($form) ?>
<!-- renders all fields *and* the form start and end tags -->
<?php echo $view['form']->form($form) ?>
The remainder of this recipe will explain how every part of the form's markup
can be modified at several different levels. For more information about form
Expand Down

0 comments on commit c008733

Please sign in to comment.