Skip to content

Commit 81d1dce

Browse files
committed
minor #7707 [Form] Updated direct submit article (HeahDude, javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Updated direct submit article There have been many issues in the past on symfony repo about this (ref symfony/symfony#19788), let's make it explicit in the docs. This article is linked at the very beginning of the Form component introduction. Commits ------- 6e9bf0b fixup comment 8a47176 Let's break a long sentence into two shorter sentences 23e06a8 [Form] Updated direct submit article
2 parents b9f8a4f + 6e9bf0b commit 81d1dce

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 the
94+
"PATCH" method, the validation extension will only handle the submitted
95+
fields. If the underlying data needs to be validated, this should be done
96+
manually, 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)