3444 Posts in 1030 Topics by 871 members
|Go to End|
11 March 2009 at 7:04pm
Trust me, it took me days to figure this out but if i have the headache on that, then someone else might probably be having same.
But here is how it worked:
static $db = array(
'Issu' => "Enum('One, Two, Three','One')",
and in the :
$fields = parent::getCMSFields();
$fields -> addFieldtoTab('Root.Content.Main', new DropdownField('Issu', 'Issue Type', Array('1'=>'One', '2'=>'Two', '3'=>'Three')));
Just replace the One, Two, and Three with you titles and you can also continue the array. Its quite simple.
11 March 2009 at 7:45pm
In your DropdownField constructor you should be using "$this->dbObject('Issue')->enumValues()" rather than the hard-coded array.
|Go to Top|