fixed empty string always on scaffolded enum fields

This commit is contained in:
icecaster 2012-10-17 12:30:05 +13:00
parent f365134375
commit 8a7f9ede97

View File

@ -95,7 +95,9 @@ class Enum extends StringField {
if(!$name) $name = $this->name;
$field = new DropdownField($name, $title, $this->enumValues($hasEmpty), $value, $form);
if($hasEmpty) {
$field->setEmptyString($emptyString);
}
return $field;
}