From 23e06a859591bf1191a1a4461070b6f3fccf3b54 Mon Sep 17 00:00:00 2001 From: HeahDude Date: Mon, 27 Mar 2017 00:18:26 +0200 Subject: [PATCH 1/3] [Form] Updated direct submit article --- form/direct_submit.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/form/direct_submit.rst b/form/direct_submit.rst index 62f2df96110..e575ddf7db0 100644 --- a/form/direct_submit.rst +++ b/form/direct_submit.rst @@ -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` @@ -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) @@ -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. From 8a47176bbb2775587967c71e8f789259c452a014 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 27 Mar 2017 16:26:02 +0200 Subject: [PATCH 2/3] Let's break a long sentence into two shorter sentences --- form/direct_submit.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/form/direct_submit.rst b/form/direct_submit.rst index e575ddf7db0..976f510518a 100644 --- a/form/direct_submit.rst +++ b/form/direct_submit.rst @@ -91,7 +91,7 @@ method, pass the submitted data directly to .. caution:: When the second parameter ``$clearMissing`` is ``false``, like with "PATCH" - method, the validation extension will only handle the submitted fields, if + 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. From 6e9bf0ba0b0c2b751ba3d3ad673fef4b33d62ee3 Mon Sep 17 00:00:00 2001 From: HeahDude Date: Wed, 5 Apr 2017 12:58:03 +0200 Subject: [PATCH 3/3] fixup comment --- form/direct_submit.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/form/direct_submit.rst b/form/direct_submit.rst index 976f510518a..ac810a20c73 100644 --- a/form/direct_submit.rst +++ b/form/direct_submit.rst @@ -90,10 +90,10 @@ method, pass the submitted data directly to .. 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. + When the second parameter ``$clearMissing`` is ``false``, like with the + "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: