Beispiel #1
0
echo $form->labelEx($model, 'Mano');
?>
		<?php 
echo $form->dropDownList($model, 'Mano', array('' => 'Seleccione una mano dominante', 'I' => 'Izquierda', 'D' => 'Derecha'));
?>
		<?php 
echo $form->error($model, 'Mano');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'Edo_Civil_idEdo_Civil');
?>
		<?php 
echo $form->dropDownList($model, 'Edo_Civil_idEdo_Civil', CHtml::listData(EdoCivil::model()->findAll(), 'idEdo_Civil', 'Nombre'), array('empty' => 'Seleccione un estado civil'));
?>
		<?php 
echo $form->error($model, 'Edo_Civil_idEdo_Civil');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'Hijos');
?>
		<?php 
echo $form->textField($model, 'Hijos');
?>
		<?php 
echo $form->error($model, 'Hijos');
Beispiel #2
0
 /**
  * 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 EdoCivil the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = EdoCivil::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }