yogs.610
(Yogapriya Me)
1
Hi,
Anyone plz help me with the code for bringing radio button while displaying data from related tables…
I have 3 tables… survey, surveyquestion and surveyanswer
survey table has -> surveyid(Pk), surveyname
surveyquestion tables has -> questionid(Pk),surveyid(Foreign key),questiontitle
surveyanswer tables has -> answerid(Pk),questionid(foreign key),answer
I want to display the question and answer in the home page… and there must be a radiobutton before answers
help me to get the radio button
Thanks.
perochak
(Amjad Mughal)
2
yogs.610
(Yogapriya Me)
3
tihs is my view.php file
<div class="view">
<b><?php echo CHtml::encode($data->getAttributeLabel('questiontitle')); ?></b>
<?php echo CHtml::encode($data->questiontitle); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('answer')); ?></b>
<?php echo CHtml::encode($data->surveyAnswers1s->answer); ?>
//how i should alter the code to get the radio button?
<br />
</div>
perochak
(Amjad Mughal)
4
<?php echo CHtml::radio($data->surveyAnswers1s->answer); ?>