Skip to content

Update form_customization.rst #4365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cookbook/form/form_customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ just one line:

.. code-block:: jinja

{{ form_widget(form) }}
{{ form(form) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to also update the PHP version below with this same change.

And I think we should show both. The nice thing about form(form) is that it renders everything, including the <form tags. But, the disadvantage is that if you didn't add a submit button when building your form, you can't add it here. So, I think both are useful. How about:

{# renders all of the fields #}
{{ form_widget(form) }}

{# renders all of the fields *and* the <form> start and end tag #}
{{ form(form) }}

What do you think?


.. code-block:: php

Expand Down