Tengo un campo activeDropdownlist para seleccionar unos valores pero quisiera lanzar un evento que segun sea el valor seleccionado, mostrar u ocutlar uno o mas campos o elementos.
algo como esto
Hi, I have a problem to create a form. I have a activeDropDownList to select some values and launch an event depending of the selected value, then show or hide some form fields or elements
this is what I have
<?php echo CHtml::activeDropDownList($model,'tipos_usuario_id',
CHtml::listData(Tipos_Usuario::model()->findAll(),'id','tipo'),
array(
'ajax' => array(
'type'=>'GET',
'url'=>CController::createUrl('controller/ajaxaction'),
)
);
?>
y en controlador
and the controller
public function actionAjaxaction()
{
if(Yii::app()->request->isAjaxRequest && isset($_GET['tipos_usuario_id']))
{
.....
}
pero hasta ahi llego. dentro del controlador iria la logica de lo que quiero devolver para actualizar el formulario, pero no se como hacerlo
but I really don't know how to go ahead. inside the controller I will put the logic that I want to return to update the form, but I don't know how to do it

Help











