Esempio n. 1
0
File: _form.php Progetto: reubsc/sds
echo $form->labelEx($model, 'otherNames');
?>
		<?php 
echo $form->textField($model, 'otherNames', array('size' => 60, 'maxlength' => 120));
?>
		<?php 
echo $form->error($model, 'otherNames');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'genderID');
?>
		<?php 
echo CHtml::activeDropDownList($model, 'genderID', CHtml::listData(Genders::model()->findAll(), 'genderID', 'genderName'), array('empty' => 'Select Gender'));
?>
		<?php 
echo $form->error($model, 'genderID');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'IDNumber');
?>
		<?php 
echo $form->textField($model, 'IDNumber', array('size' => 15, 'maxlength' => 15));
?>
		<?php 
echo $form->error($model, 'IDNumber');
Esempio n. 2
0
 /**
  * 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 Genders the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Genders::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }