?> <div class="form"> <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'pla-form', 'enableAjaxValidation'=>false, )); ?> <p class="note">Campos con <span class="required">*</span> son requeridos.</p> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php echo $form->labelEx($model,'PLA'); ?> <?php echo $form->dropDownList($model,'PLA', CHtml::listData(Cont::model()->findAll(), 'PLA', 'PLA'),array('empty' => ' Seleccione la plaza')); ?> <?php echo $form->error($model,'PLA'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'CED'); ?> <?php echo $form->dropDownList($model,'CED', CHtml::listData(Pers::model()->findAll(), 'CED', 'NOM'),array('empty' => ' Seleccione Odontologo')); ?> <?php //echo $form->textField($model,'CED',array('size'=>50,'maxlength'=>50)); ?> <?php echo $form->error($model,'CED'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'COD'); ?> <?php echo $form->dropDownList($model,'COD', CHtml::listData(Up::model()->findAll(array('condition'=>'REGION="CHOROTEGA"')), 'COD', 'DES'),array('empty' => ' Seleccione la U.P.')); ?> <?php echo $form->error($model,'COD'); ?> </div>
/** * 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 Cont the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Cont::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }