Skip to content

Commit 94186ea

Browse files
committed
minor #6420 Added tip for optional second parameter for form submissions. (Michael Phillips)
This PR was merged into the 2.3 branch. Discussion ---------- Added tip for optional second parameter for form submissions. | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #6415 Commits ------- 153219a Added tip for optional second parameter for form submissions.
2 parents b73e3f4 + 153219a commit 94186ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cookbook/form/direct_submit.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ method, pass the submitted data directly to
8484

8585
$form->get('firstName')->submit('Fabien');
8686

87+
.. tip::
88+
89+
When submitting a form via a "PATCH" request, you may want to update only a few
90+
submitted fields. To achieve this, you may pass an optional second boolean
91+
parameter to ``submit()``. Passing ``false`` will remove any missing fields
92+
within the form object. Otherwise, the mising fields will be set to ``null``.
93+
8794
.. _cookbook-form-submit-request:
8895

8996
Passing a Request to Form::submit() (Deprecated)

0 commit comments

Comments
 (0)