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

forms: Export textual name for custom list fields

parent 1fbec0a0
No related branches found
No related tags found
No related merge requests found
...@@ -948,6 +948,13 @@ class SelectionField extends FormField { ...@@ -948,6 +948,13 @@ class SelectionField extends FormField {
} }
return $this->_choices; return $this->_choices;
} }
function export($value) {
if ($value && is_numeric($value)
&& ($item = DynamicListItem::lookup($value)))
return $item->toString();
return $value;
}
} }
class SelectionWidget extends ChoicesWidget { class SelectionWidget extends ChoicesWidget {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment