diff --git a/src/ORM/FieldType/DBEnum.php b/src/ORM/FieldType/DBEnum.php index 8293740b0ea..e358b8dc99a 100644 --- a/src/ORM/FieldType/DBEnum.php +++ b/src/ORM/FieldType/DBEnum.php @@ -140,7 +140,7 @@ public function formField($title = null, $name = null, $hasEmpty = false, $value $name = $this->getName(); } - $field = new DropdownField($name, $title, $this->enumValues(false), $value); + $field = DropdownField::create($name, $title, $this->enumValues(false), $value); if ($hasEmpty) { $field->setEmptyString($emptyString); }