function init() { parent::init(); $this->addField('name'); $this->addField('sex')->enum(array('M', 'F'))->defaultValue('M'); }