Skip to content

FR: Add getChangedValues() method #197

@milo

Description

@milo

Can be useful to receive only updated values from form/container. For example:

$diff = $form->getUpdatedValues();
if (count($diff)) {
   $db->update(...);
} else {
   $this->flash('Nothing changed.');
}

# or
$this->log("User $username:", $form->getUpdatedValues());

API changes from top of my head:

  • FormContainer::getChangedValues()
  • BaseControl::setAlwaysChanged(bool ...)

Hard to decide in which point create an original values snapshot. Probably exactly before Form::getHttpData().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions