how do i make activeradiobutton as readonly

i am in need of making radiobutton as readonly…what should i do for that

I can be wrong…but, from what I know, you can't make radios readonly.

it's a workaround and can be easily switched off using eg firebug, but you can:

  • add disabled attribute, eg:

    CHtml::radioButtonList(‘test’,1,array(‘test1’, ‘test2’, ‘test3’), array(‘disabled’=>‘disabled’))
  • disabled fields aren't submitted so you have to put a hidden field with the same name (not id - cause it would make a conflict when using js) and set its value to selected radio value