Skip to content

Commit 23e06a8

Browse files
committed
[Form] Updated direct submit article
1 parent 09cc5fc commit 23e06a8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

form/direct_submit.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ submissions::
4242
Calling Form::submit() manually
4343
-------------------------------
4444

45-
.. versionadded:: 2.3
46-
Before Symfony 2.3, the ``submit()`` method was known as ``bind()``.
47-
4845
In some cases, you want better control over when exactly your form is submitted
4946
and what data is passed to it. Instead of using the
5047
:method:`Symfony\\Component\\Form\\FormInterface::handleRequest`
@@ -88,9 +85,16 @@ method, pass the submitted data directly to
8885

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

91+
.. caution::
92+
93+
When the second parameter ``$clearMissing`` is ``false``, like with "PATCH"
94+
method, the validation extension will only handle the submitted fields, if
95+
the underlying data needs to be validated, this should be done manually,
96+
i.e using the validator.
97+
9498
.. _form-submit-request:
9599

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

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

0 commit comments

Comments
 (0)