<input type = "radio"
name = "country"
id = "engCnt"
value = "eng"
checked = "checked">
<label for = "engCnt">ENG</label>
<input type = "radio"
name = "country"
id = "gerCnt"
value = "ger">
<label for = "gerCnt">GER</label>
<input type = "radio"
name = "country"
id = "allCnt"
value = "all">
<label for = "allCnt">All</label>
I need to decide dynamically whether or not button should be checked and what should be it’s label based on the site language. I am not showing you that logic, because even without it I have a problem. This is the minimum Yii code that I use to generate radio buttons:
There are 2 problems with this code. First: ENG option is not checked by default. Second, I can not check manually anything. I have just 3 unchecked radio buttons, and I can not check any of them.