Thanks, I know I can restrict the valid value of the field. However, I still have to assign key->value mapping manually in every form refer to the same field (foreign key)
e.g. in all view I need to define CHtml::activeListBox(…, array('A'=>array('label'=>'Active), 'I'=>array('label',=>'Inactive'));
If this can be defined in CActiveRecord it will be more convenience.
This is called lookup. You may or may not store them in a database table. In both cases, it makes sense that you define a static method in your model class which returns the associative array. And then, in the view, you may simply call this static method to get the list data.