Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cookbook/form/direct_submit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ method, pass the submitted data directly to

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

.. tip::

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Form::submit().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HeahDude Shouldn't it be $form->submit(…) instead, as in the example above the tip?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't answer that :) I just thought it would be more clear to mention the class involved by that method.

ping @symfony/documentors !

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's necessary. Above this example we already link to the API docs of submit() twice. That should be clear enough.

within the form object. Otherwise, the mising fields will be set to ``null``.

.. _cookbook-form-submit-request:

Passing a Request to Form::submit() (Deprecated)
Expand Down