echo $form->dropDownList($model, 'tipo_vinculacion', array('Beneficiario' => 'Beneficiario', 'Cotizante' => 'Cotizante'), array('class' => 'input-medium')); ?> <?php echo $form->error($model, 'tipo_vinculacion'); ?> </div> </div> <div class="row"> <div class="span5"> <?php echo $form->labelEx($model, 'tratamiento_interes_id'); ?> <?php echo $form->dropDownList($model, 'tratamiento_interes_id', CHtml::listData(TratamientoInteres::model()->findAll("estado = 'activo' order by 'name'"), 'id', 'name'), array('class' => 'input-xlarge')); ?> <?php echo $form->error($model, 'tratamiento_interes_id'); ?> </div> <div class="span5"> </div> </div> </div> <div class="hero-unit"> <h3>Datos de Contacto</h3>
/** * 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 TratamientoInteres the loaded model * @throws CHttpException */ public function loadModel($id) { $model = TratamientoInteres::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }