Skip to content

[Form] Support partial binding #1341

Closed
Closed
@ericclemmons

Description

@ericclemmons

binding partial parameters effectively clears all existing values from the model and only persists the new parameters that are passed in. See example:

// Author.php
class Author
{
    public $name;
    public $email = 'bar';
}

// AuthorType
...
$builder->add('name', 'text')->author('text');
...

Passing $form->bind(array('name' => 'foo')) wipes out the existing email value.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions