Hi,
I am using a relationship wit "Question" has many "Answer".
I am trying to display for each Question a set of Answers with radio buttons:
$values = CHtml::listData($data->answers, 'id', 'answer', 'tridentQuestion.id');
echo CHtml::activeRadioButtonList($data->answers[0], 'id', $values)
I get only "array" for the labels.
What am I doing wrong?
Before the code was without the $groupField parameter in CHtml::listData().
$values = CHtml::listData($data->answers, 'id', 'answer');
echo CHtml::activeRadioButtonList($data->answers[0], 'id', $values)
The problem is, that for all questions the answers as radio button are one single group.
So when I click on the radio button in the first question it unselects all the other radio buttons from the other questions.