Skip to content

[Form] Add examples for submitting PATCH requests without handleRequest() #6415

Closed
@michaeljoelphillips

Description

@michaeljoelphillips

Greetings,

I ran into a specific use case where a single page application was submitting a form to a REST API without a submit button via an HTTP PATCH method. I had read somewhere (probably StackOverflow) that handleRequest() handles partial updates since Symfony 2.x, but since there wasn't a submit button, handleRequest() wouldn't submit the form.

Long story short, I wasn't able to find documentation regarding a solution until I saw the API for the submit() function with the optional $clearMissing parameter. I'm willing to submit a PR with this use case highlighting the ability to do partial updates via the submit() function if it sounds useful to anyone else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions