diff --git a/code/RelationFieldsTestPage.php b/code/RelationFieldsTestPage.php index 412510c..7e71422 100644 --- a/code/RelationFieldsTestPage.php +++ b/code/RelationFieldsTestPage.php @@ -14,7 +14,7 @@ class RelationFieldsTestPage extends TestPage { function getCMSFields() { $fields = parent::getCMSFields(); - $fields->addFieldToTab("Root.Content.CheckboxSet", + $fields->addFieldToTab("Root.Content.CheckboxSet", new CheckboxSetField("CheckboxSet", "CheckboxSetField", TestCategory::map())); /* diff --git a/code/TestCategory.php b/code/TestCategory.php index a7726e6..9a868cc 100644 --- a/code/TestCategory.php +++ b/code/TestCategory.php @@ -16,7 +16,7 @@ class TestCategory extends DataObject { */ static function map() { $categories = DataObject::get('TestCategory'); - if($categories) return $categories->toDropdownMap(); + if($categories) return $categories->map('ID', 'Title'); else return array(); }