echo $form->labelEx($model, 'personnelTypeID'); ?> <?php echo CHtml::activeDropDownList($model, 'personnelTypeID', CHtml::listData(PersonnelTypes::model()->findAll(), 'personnelTypeID', 'personnelTypeName'), array('empty' => 'Select Personnel Type')); ?> <?php echo $form->error($model, 'personnelTypeID'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'salutationID'); ?> <?php echo CHtml::activeDropDownList($model, 'salutationID', CHtml::listData(Salutations::model()->findAll(), 'salutationID', 'salutationName'), array('empty' => 'Select Salutation')); ?> <?php echo $form->error($model, 'salutationID'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'surname'); ?> <?php echo $form->textField($model, 'surname', array('size' => 60, 'maxlength' => 60)); ?> <?php echo $form->error($model, 'surname');
/** * 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 Salutations the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Salutations::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }