From 300ff6d7f1338e9ddc136d7f0283fb7e34c37f55 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Tue, 25 Feb 2014 15:02:47 -0600 Subject: [PATCH] forms: Export textual name for custom list fields --- include/class.dynamic_forms.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index 7d7c73aa6..7ac099528 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -948,6 +948,13 @@ class SelectionField extends FormField { } return $this->_choices; } + + function export($value) { + if ($value && is_numeric($value) + && ($item = DynamicListItem::lookup($value))) + return $item->toString(); + return $value; + } } class SelectionWidget extends ChoicesWidget { -- GitLab