$form->dropDownList

<div class="control-group">
<?php echo $form->labelEx($model,'project_id',array('class' => 'control-label')); ?>
<div class="controls">
<?php
$project =Project::model()->findAll();
$list = CHtml::listData($project,'project_id','name');
echo $form->dropDownList($model,'project_id', $list);
?>
<?php echo $form->error($model,'project_id'); ?>
</div>
</div>

posted @ 2014-08-15 11:37  chk520  阅读(210)  评论(0编辑  收藏  举报