default values in forms

Hi,

how can i put dafault vaules into yii form elements ?

I mean this:

echo ‘<input type=“text” [color="#8B0000"]value="’.$mid.’"[/color] name=“mid” id=“mid”>’;

If you use a standard Gii code, you can work in the controller.

Something like that:




public function actionCreate()

{

   $model=new ModelCLass;

   $model->mid=$value;


   if (isset ...)