echo $form->labelEx($model, 'NAMA'); ?> <?php echo $form->textField($model, 'NAMA', array('size' => 25, 'maxlength' => 25)); ?> <?php echo $form->error($model, 'NAMA'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'Pilih Privilege'); ?> <?php $data = CHtml::listData(Privilege::model()->findAll(), 'ID_PRIVILEGE', 'NAMA_PRIVILEGE'); echo $form->dropDownList($model, 'ID_PRIVILEGE', $data); ?> <?php echo $form->error($model, 'ID_PRIVILEGE'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'NO_HP'); ?> <?php echo $form->textField($model, 'NO_HP', array('size' => 15, 'maxlength' => 15)); ?> <?php
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return Privilege the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Privilege::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }