Posted By

xavsio4 on 08/05/10


Tagged

Yii


Versions (?)

Yii DropDownlist


 / Published in: PHP
 

  1. From a table
  2.  
  3. A
  4. <?php echo CHtml::activeDropDownList($model, 'departmentId', CHtml::listData(
  5. Department::model()->findAll(), 'id', 'name'
  6. ) ); ?>
  7.  
  8. B
  9. <?php echo $form->dropDownList($model,'status',Lookup::items('PostStatus')); ?>
  10.  
  11.  
  12. Application interface values
  13.  
  14. <?php echo CHtml::dropDownList('public', $model, array('0' => 'Private', '1' => 'Public'));?>

Report this snippet  

You need to login to post a comment.