diff --git a/forms/TypeDropdown.php b/forms/TypeDropdown.php index 24155280f..5c89658a3 100755 --- a/forms/TypeDropdown.php +++ b/forms/TypeDropdown.php @@ -1,21 +1,38 @@ _t('TypeDropdown.NONE', 'None') ); - - foreach( $options as $option ) - $optionArray[$option->ID] = $option->Title; - - parent::__construct( $name, $title, $optionArray, $value, $form ); + + if($options) foreach( $options as $option ) { + $optionArray[$option->ID] = $option->{$this->titleFieldName}; + } + + parent::__construct( $name, $title, $optionArray, $value, $form, $emptyString ); + } + + function setTitleFieldName($name) { + $this->titleFieldName = $name; } } ?> \ No newline at end of file