Skip to content
Snippets Groups Projects
Commit e7e7a308 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1238 from greezybacon/issue/737


forms: Always attempt to look up selection value by name

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents e5e67003 b1b73761
No related branches found
No related tags found
No related merge requests found
......@@ -1187,11 +1187,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.
Finish editing this message first!
Please register or to comment