Skip to content

Commit

Permalink
Fix Field::getValue()
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Oct 18, 2016
1 parent f3edc36 commit cb6df8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/Form/Field/AbstractField.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,16 @@ public function getValue()
return ($this->value !== null && $this->value !== '') ? $this->value : $this->getAttribute('default');
}

/**
* getRawValue
*
* @return mixed
*/
public function getRawValue()
{
return $this->value;
}

/**
* Method to set property value
*
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ public function getValues($fieldset = null, $group = null)

foreach ($this->getFields($fieldset, $group) as $name => $field)
{
FormHelper::setByPath($data, $name, $field->getValue());
FormHelper::setByPath($data, $name, $field->getRawValue());
}

return $data;
Expand Down

0 comments on commit cb6df8c

Please sign in to comment.