Skip to content

Commit

Permalink
[Form] Updated direct submit article
Browse files Browse the repository at this point in the history
  • Loading branch information
HeahDude committed Mar 26, 2017
1 parent 09cc5fc commit 23e06a8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions form/direct_submit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ submissions::
Calling Form::submit() manually
-------------------------------

.. versionadded:: 2.3
Before Symfony 2.3, the ``submit()`` method was known as ``bind()``.

In some cases, you want better control over when exactly your form is submitted
and what data is passed to it. Instead of using the
:method:`Symfony\\Component\\Form\\FormInterface::handleRequest`
Expand Down Expand Up @@ -88,9 +85,16 @@ method, pass the submitted data directly to

When submitting a form via a "PATCH" request, you may want to update only a few
submitted fields. To achieve this, you may pass an optional second boolean
parameter to ``submit()``. Passing ``false`` will remove any missing fields
argument to ``submit()``. Passing ``false`` will remove any missing fields
within the form object. Otherwise, the missing fields will be set to ``null``.

.. caution::

When the second parameter ``$clearMissing`` is ``false``, like with "PATCH"
method, the validation extension will only handle the submitted fields, if
the underlying data needs to be validated, this should be done manually,
i.e using the validator.

.. _form-submit-request:

Passing a Request to Form::submit() (Deprecated)
Expand Down Expand Up @@ -129,5 +133,5 @@ a convenient shortcut to the previous example::

Passing the :class:`Symfony\\Component\\HttpFoundation\\Request` directly to
:method:`Symfony\\Component\\Form\\FormInterface::submit` still works, but is
deprecated and will be removed in Symfony 3.0. You should use the method
deprecated and has been removed in Symfony 3.0. You should use the method
:method:`Symfony\\Component\\Form\\FormInterface::handleRequest` instead.

0 comments on commit 23e06a8

Please sign in to comment.