/**
 * 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 the ID of the model to be loaded
 */
 public function loadModel($id)
 {
     $model = PreguntaSecreta::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #2
0
?>


<?php 
echo $form->dropDownListGroup($model, 'fk_pais', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => CHtml::listData(Pais::model()->findAll(array('order' => 'pais')), 'id_pais', 'pais'), 'htmlOptions' => array('empty' => 'Seleccione su País'))));
?>


	<?php 
//echo $form->textFieldGroup($model,'fk_pregunta_secreta',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5'))));
?>



<?php 
echo $form->dropDownListGroup($model, 'fk_pregunta_secreta', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => CHtml::listData(PreguntaSecreta::model()->findAll(array('order' => 'pregunta_secreta')), 'id_pregunta_secreta', 'pregunta_secreta'), 'htmlOptions' => array('empty' => 'Seleccione su Pregunta Secreta'))));
?>


	<?php 
echo $form->textFieldGroup($model, 'respuesta_secreta', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 256))));
?>

	<?php 
echo $form->textFieldGroup($model, 'telefono', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 15))));
?>

	<?php 
//echo $form->textFieldGroup($model,'foto_perfil',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>100))));
?>