@@ -123,20 +123,9 @@ You've also assigned each a "type" (e.g. ``TextType`` and ``DateType``),
123123represented by its fully qualified class name. Among other things, it determines
124124which HTML form tag(s) is rendered for that field.
125125
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-
133126Finally, you added a submit button with a custom label for submitting the form to
134127the server.
135128
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-
140129Symfony comes with many built-in types that will be discussed shortly
141130(see :ref: `book-forms-type-reference `).
142131
@@ -259,12 +248,6 @@ your controller::
259248 is called. Otherwise, changes done in the ``*_SUBMIT `` events aren't applied to the
260249 view (like validation errors).
261250
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-
268251This controller follows a common pattern for handling forms, and has three
269252possible paths:
270253
@@ -313,9 +296,6 @@ possible paths:
313296Submitting Forms with Multiple Buttons
314297~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315298
316- .. versionadded :: 2.3
317- Support for buttons in forms was introduced in Symfony 2.3.
318-
319299When your form contains more than one submit button, you will want to check
320300which of the buttons was clicked to adapt the program flow in your controller.
321301To 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::
491471 'validation_groups' => array('registration'),
492472 ))->add(...);
493473
494- .. versionadded :: 2.7
495- The ``configureOptions() `` method was introduced in Symfony 2.7. Previously,
496- the method was called ``setDefaultOptions() ``.
497-
498474If you're creating :ref: `form classes <book-form-creating-form-classes >` (a
499475good practice), then you'll need to add the following to the ``configureOptions() ``
500476method::
@@ -517,9 +493,6 @@ be used to validate the underlying object.
517493Disabling Validation
518494~~~~~~~~~~~~~~~~~~~~
519495
520- .. versionadded :: 2.3
521- The ability to set ``validation_groups `` to false was introduced in Symfony 2.3.
522-
523496Sometimes it is useful to suppress the validation of a form altogether. For
524497these cases you can set the ``validation_groups `` option to ``false ``::
525498
@@ -620,9 +593,6 @@ work in the book section about :ref:`validation groups <book-validation-validati
620593Groups based on the Clicked Button
621594~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
622595
623- .. versionadded :: 2.3
624- Support for buttons in forms was introduced in Symfony 2.3.
625-
626596When your form contains multiple submit buttons, you can change the validation
627597group depending on which button is used to submit the form. For example,
628598consider 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:
10441014
10451015 <!-- app/Resources/views/default/newAction.html.php -->
10461016 <?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().
10491017 'action' => $view['router']->path('target_route'),
10501018 'method' => 'GET',
10511019 )) ?>
@@ -1981,4 +1949,3 @@ Learn more from the Cookbook
19811949.. _`form_div_layout.html.twig` : https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
19821950.. _`Cross-site request forgery` : http://en.wikipedia.org/wiki/Cross-site_request_forgery
19831951.. _`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