<div class="wide form"> <?php $form = $this->beginWidget('CActiveForm', array('id' => 'maestro-valores-form', 'enableAjaxValidation' => false)); ?> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php echo CHtml::Label('Grupo', '3'); echo CHtml::DropDownList("lugarcitos", "", CHtml::listData(MaestroGrupos::model()->findAll(), 'id', 'descri'), array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('Maestrovalores/cargaatributos'), 'update' => '#MaestroValores_hidat'), 'prompt' => 'Seleccione un grupo')); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'hidat'); echo $form->dropDownList($model, 'hidat', array(), array('prompt' => 'Seleccione una organizacion')); ?> </div> <div class="row"> <?php
/** * 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 MaestroGrupos the loaded model * @throws CHttpException */ public function loadModel($id) { $model = MaestroGrupos::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'El enlace o direccion solicitado no existe'); } return $model; }