You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't use the ``form()`` or ``form_start()`` functions to render the
172
-
starting and ending form tags.
173
-
174
-
Experienced Symfony developers will recognize that we're rendering the ``<form>``
175
-
tags manually instead of using the ``form_start()`` or ``form()`` functions.
176
-
While those are convenient, they take away from some clarity with little
177
-
benefit.
178
-
179
-
.. tip::
180
-
181
-
The exception is a delete form because it's really just one button and
182
-
so benefits from some of these extra shortcuts.
164
+
{{ form_end(form) }}
183
165
184
166
If you need more control over how your fields are rendered, then you should
185
167
remove the ``form_widget(form)`` function and render your fields individually.
186
-
See `How to Customize Form Rendering`_ for more information on this and how
168
+
See :doc:`/cookbook/form/form_customization` for more information on this and how
187
169
you can control *how* the form renders at a global level using form theming.
188
170
189
171
Handling Form Submits
@@ -224,8 +206,3 @@ Second, we recommend using ``$form->isSubmitted()`` in the ``if`` statement
224
206
for clarity. This isn't technically needed, since ``isValid()`` first calls
225
207
``isSubmitted()``. But without this, the flow doesn't read well as it *looks*
226
208
like the form is *always* processed (even on the GET request).
227
-
228
-
.. _`register your form type as a service`: http://symfony.com/doc/current/cookbook/form/create_custom_field_type.html#creating-your-field-type-as-a-service
0 commit comments