I would like to display a dropdown list and text field according to the selection of a radio button in Yii form. ie, if I select the first option , it must display a dropdown list and if I select the second option the text box must appear. This is the code for my radio button:
<?php echo $form->radioButtonList($model,'service_type',array('0'=>'Fixed Price Service','1'=>'Service at hourly rate'));?>
When selecting the "Fixed Price Service" the dropdown
<?php echo $form->dropdownList( $model, 'min_budget', array(
"0"=>"Select your minimum budget",
"1" => "10000",
"2" => "20000",
"3" => "50000",
));
?>
and on selecting "Service at hourly rate" the text field must appear
<?php echo $form->textField($model,'hourly_rate',array('size'=>15,'maxlength'=>1)); ?>
this function must appear without refreshing or clicking any submit buttons. How can I implement this in Yii form ?