diff --git a/model/fieldtypes/Enum.php b/model/fieldtypes/Enum.php index 9a89313dd..88e38906d 100644 --- a/model/fieldtypes/Enum.php +++ b/model/fieldtypes/Enum.php @@ -95,7 +95,9 @@ class Enum extends StringField { if(!$name) $name = $this->name; $field = new DropdownField($name, $title, $this->enumValues($hasEmpty), $value, $form); - $field->setEmptyString($emptyString); + if($hasEmpty) { + $field->setEmptyString($emptyString); + } return $field; } @@ -130,4 +132,4 @@ class Enum extends StringField { ? array_merge(array('' => ''), ArrayLib::valuekey($this->enum)) : ArrayLib::valuekey($this->enum); } -} \ No newline at end of file +}