HI!
I have a problem in creation of select. I follow documentation http://doc.silverstripe.com/doku.php?id=dropdownfield.
I put in Page.php
class MyObject extends DataObject {
static $db = array(
'Country' => "Enum('New Zealand,United States,Germany','New Zealand')"
);
}
under
class Page extend SiteTree{ ..... }
and in the controller of my page
class Page_Controller extend ContentController{
$field = new DropdownField(
'Country',
'Country',
singleton('MyObject')->dbObject('Country')->enumValues()
);
}
but something is wrong, can you help me?