Skip to content
Snippets Groups Projects
Commit b1b73761 authored by Jared Hancock's avatar Jared Hancock
Browse files

forms: Always attempt to look up selection value by name

parent 7044ac71
No related branches found
No related tags found
No related merge requests found
......@@ -1169,11 +1169,12 @@ class SelectionField extends FormField {
function parse($value) {
$config = $this->getConfiguration();
if (is_int($value))
return $this->to_php($this->getWidget()->getEnteredValue(), (int) $value);
$val = $this->to_php($this->getWidget()->getEnteredValue(), (int) $value);
elseif (!$config['typeahead'])
return $this->to_php(null, (int) $value);
else
return $this->to_php($value);
$val = $this->to_php(null, (int) $value);
if (!$val)
$val = $this->to_php($value);
return $val;
}
function to_php($value, $id=false) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment