How to render data as html in form view


I’m using CLEditor to allow users to write better formatted noted, i.e. bold, italic, strike through etc.

When you save the form, you get shown the data in a view page (I dont know if this is standard Yii mechanics)

Problem is, that the data saved is in HTML to give the formatting etc, but I cant output it in the View as HTML, instead is TEXT - and you therfore see all the HTML code…

How do i edit my ?r=feedback/view page so that the atribute renders as html?

My view has this in it,

<?php $this->widget('zii.widgets.CListView', array(



)); ?>

but if i open _view.php and change somethign like put hello world in the form, it doesnt appear when I load the page… so its like im not even editing the right page

I wanted to see if I could solve it by doing the following

<?php echo CHtml::encode($data->visit_feedback); ?>


<?php echo CHtml::decode($data->visit_feedback); ?>


Mother…of…God… I was uploading to a new testing server, I forgot to look at the right server!! :unsure: … Well, i’ve not done that for a very long time, doh! So now I can see the List showing HTML, great,


I cant seem to do the same for the details list (zii.widgets.CDetailView ) …?


I solved it, and I love the solution.


<?php $this->widget('zii.widgets.CDetailView', array(






OMG i feel anger and sweet relief at the same time! :o :D :angry: :-X

I hate being noob.