@@ -123,20 +123,9 @@ You've also assigned each a "type" (e.g. ``TextType`` and ``DateType``),
123
123
represented by its fully qualified class name. Among other things, it determines
124
124
which HTML form tag(s) is rendered for that field.
125
125
126
- .. versionadded :: 2.8
127
- To denote the form type, you have to use the fully qualified class name - like
128
- ``TextType::class `` in PHP 5.5+ or ``Symfony\Component\Form\Extension\Core\Type\TextType ``.
129
- Before Symfony 2.8, you could use an alias for each type like ``text `` or
130
- ``date ``. The old alias syntax will still work until Symfony 3.0. For more details,
131
- see the `2.8 UPGRADE Log `_.
132
-
133
126
Finally, you added a submit button with a custom label for submitting the form to
134
127
the server.
135
128
136
- .. versionadded :: 2.3
137
- Support for submit buttons was introduced in Symfony 2.3. Before that, you had
138
- to add buttons to the form's HTML manually.
139
-
140
129
Symfony comes with many built-in types that will be discussed shortly
141
130
(see :ref: `book-forms-type-reference `).
142
131
@@ -259,12 +248,6 @@ your controller::
259
248
is called. Otherwise, changes done in the ``*_SUBMIT `` events aren't applied to the
260
249
view (like validation errors).
261
250
262
- .. versionadded :: 2.3
263
- The :method: `Symfony\\ Component\\ Form\\ FormInterface::handleRequest ` method
264
- was introduced in Symfony 2.3. Previously, the ``$request `` was passed
265
- to the ``submit `` method - a strategy which is deprecated and will be
266
- removed in Symfony 3.0. For details on that method, see :ref: `cookbook-form-submit-request `.
267
-
268
251
This controller follows a common pattern for handling forms, and has three
269
252
possible paths:
270
253
@@ -313,9 +296,6 @@ possible paths:
313
296
Submitting Forms with Multiple Buttons
314
297
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315
298
316
- .. versionadded :: 2.3
317
- Support for buttons in forms was introduced in Symfony 2.3.
318
-
319
299
When your form contains more than one submit button, you will want to check
320
300
which of the buttons was clicked to adapt the program flow in your controller.
321
301
To do this, add a second button with the caption "Save and add" to your form::
@@ -491,10 +471,6 @@ you'll need to specify which validation group(s) your form should use::
491
471
'validation_groups' => array('registration'),
492
472
))->add(...);
493
473
494
- .. versionadded :: 2.7
495
- The ``configureOptions() `` method was introduced in Symfony 2.7. Previously,
496
- the method was called ``setDefaultOptions() ``.
497
-
498
474
If you're creating :ref: `form classes <book-form-creating-form-classes >` (a
499
475
good practice), then you'll need to add the following to the ``configureOptions() ``
500
476
method::
@@ -517,9 +493,6 @@ be used to validate the underlying object.
517
493
Disabling Validation
518
494
~~~~~~~~~~~~~~~~~~~~
519
495
520
- .. versionadded :: 2.3
521
- The ability to set ``validation_groups `` to false was introduced in Symfony 2.3.
522
-
523
496
Sometimes it is useful to suppress the validation of a form altogether. For
524
497
these cases you can set the ``validation_groups `` option to ``false ``::
525
498
@@ -620,9 +593,6 @@ work in the book section about :ref:`validation groups <book-validation-validati
620
593
Groups based on the Clicked Button
621
594
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
622
595
623
- .. versionadded :: 2.3
624
- Support for buttons in forms was introduced in Symfony 2.3.
625
-
626
596
When your form contains multiple submit buttons, you can change the validation
627
597
group depending on which button is used to submit the form. For example,
628
598
consider a form in a wizard that lets you advance to the next step or go back
@@ -1044,8 +1014,6 @@ to the ``form()`` or the ``form_start()`` helper:
1044
1014
1045
1015
<!-- app/Resources/views/default/newAction.html.php -->
1046
1016
<?php echo $view['form']->start($form, array(
1047
- // The path() method was introduced in Symfony 2.8. Prior to 2.8,
1048
- // you had to use generate().
1049
1017
'action' => $view['router']->path('target_route'),
1050
1018
'method' => 'GET',
1051
1019
)) ?>
@@ -1981,4 +1949,3 @@ Learn more from the Cookbook
1981
1949
.. _`form_div_layout.html.twig` : https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
1982
1950
.. _`Cross-site request forgery` : http://en.wikipedia.org/wiki/Cross-site_request_forgery
1983
1951
.. _`view on GitHub` : https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form
1984
- .. _`2.8 UPGRADE Log` : https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form
0 commit comments