echo $form->labelEx($model, 'certificate'); ?> <?php echo $form->textArea($model, 'certificate', array('rows' => 6, 'cols' => 50)); ?> <?php echo $form->error($model, 'certificate'); ?> </div> <div class="form-group"> <?php echo $form->labelEx($model, 'routeofentry'); ?> <?php echo $form->dropDownList($model, 'routeofentry', CHtml::listData(MrProfessionType::model()->findAll(), 'id', 'profession_type'), array('empty' => '--- Select Profession ---')); ?> <?php //echo $form->textField($model,'routeofentry'); ?> <?php echo $form->error($model, 'routeofentry'); ?> </div> <!-- <div class="form-group"> <?php //echo $form->labelEx($model,'status'); ?> <?php //echo RBLHtml::enumRadioButtonList( $model,'status');
/** * 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 MrProfessionType the loaded model * @throws CHttpException */ public function loadModel($id) { $model = MrProfessionType::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<div class="row"> <div class="col-lg-12"> <h1 class="page-header" style="width: 300px; float: left;">Student's Details<?php //echo $model->id; ?> </h1> <a href="<?php echo Yii::app()->createUrl('mrCourseRegistration/register'); ?> " style="line-height:40px; float: right;"> Register in a course </a> </div> </div> <?php Yii::app()->session['student_reg'] = $model->CDCNO; ?> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'firstname', 'lastname', array('name' => 'dob', 'value' => $this->getDateFormat($model->dob)), 'address', 'city', 'state', 'zip', 'email', 'mobile', 'CDCNO', 'INDOSNO', 'passportno', 'certificate', 'routeofentry', array('name' => 'routeofentry', 'type' => 'raw', 'value' => MrProfessionType::model()->findByPk($model->routeofentry)->profession_type)))); ?> <br clear="all" /> <div style="padding:10px; margin:0px auto; width:250px;"> <a href="<?php echo Yii::app()->createUrl('mrCourseRegistration/register'); ?> " style="line-height:40px"> Register for a course </a> </div>