-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Conversation
In the Form chapter of Book for Symphony 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.
👍 |
1 similar comment
👍 |
@@ -67,7 +67,7 @@ just one line: | |||
|
|||
.. code-block:: jinja | |||
|
|||
{{ form_widget(form) }} | |||
{{ form(form) }} |
There was a problem hiding this comment.
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?
👍 to @weaverryan |
@oopsFrogs Awesome - do you want to make that change? If not, I can merge and then make the change. Thanks! |
To @weaverryan, please make the change and merge it, since I'm a newbie for editing in the github, I've tried to add the change you mentioned but failed to find where to start, sorry!!! |
Thanks for starting this, @oopsFrogs ! I've continued this in #4399 To add new commits to a PR, you need to add the commits to the branch of the PR. In this case, the branch is For now, I've done this for you. Thanks again! |
…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
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.