/** * 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 ReferenceEducations the loaded model * @throws CHttpException */ public function loadModel($id) { $model = ReferenceEducations::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<button type="button" class="btn btn-default" id="choose_employee">Choose</button> </span> </div> <?php echo CHtml::error($model, 'employee_id'); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'education_id', array('class' => $label_class)); ?> <div class="col-md-6 col-xs-12"> <?php echo CHtml::activeDropDownList($model, 'education_id', CHtml::listData(ReferenceEducations::model()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'data-live-search' => 'true', 'class' => 'validate[required] form-control select')); ?> <?php echo CHtml::error($model, 'education_id'); ?> </div> </div> <div class="form-group"> <?php echo CHtml::activeLabelEx($model, 'school', array('class' => $label_class)); ?> <div class="col-md-6 col-xs-12"> <?php echo CHtml::activeTextField($model, 'school', array('size' => 60, 'maxlength' => 100, 'class' => 'validate[required] form-control')); ?>