Exemple #1
0
    <p class="note"><?php 
echo Yii::t('lang', 'Fields with <span class="required">*</span> are required.');
?>
</p>

	<?php 
echo $form->errorSummary($model);
?>

    <div class="row">
        <?php 
echo $form->labelEx($model, 'top');
?>
        <?php 
$bulletins = Yii::app()->db->createCommand()->select('id, name')->from(Bulletin::model()->tableName())->queryAll();
echo $form->listBox($model, 'top', CHtml::listData($bulletins, 'id', 'name'), array('multiple' => 'true', 'size' => 10));
?>
        <?php 
echo $form->error($model, 'top');
?>
	</div>

    <div class="row">
        <?php 
echo $form->labelEx($model, 'answer');
?>
        <?php 
$users = Yii::app()->db->createCommand()->select('id, username')->from(User::model()->tableName())->queryAll();
echo $form->listBox($model, 'answer', CHtml::listData($users, 'id', 'username'), array('multiple' => 'true', 'size' => 10));
?>