Jump to content
Larry Ullman's Book Forums

Action On Radio Button


mint
 Share

Recommended Posts

I want to enable a text field and button when the user selects a radio button, I have tried the following code but not working.

echo CHtml::textField('trid','',array('id'=>'trid','size'=>7,'disabled'=>true));
echo CHtml::submitButton('Submit', array('id'=>'submit','name'=>'submit','disabled'=>true));
echo('<b>Dispaly records acoording to status number.</b>');
echo CHtml::radioButton('status',false,array(
"success"=>"function(){
 $(#trid).attr('enabled',true)';}
 $(#submit).attr('enabled',true)';",						
));

Link to comment
Share on other sites

I have not found it on the docs anywhere, but it was mentioned in the yii framework forum by some one as an example and I think this tag was for a drop down list. Can you suggest some other html option for radio button to do this task.

Link to comment
Share on other sites

 Share

×
×
  • Create New...