I'm looking for a easy way to show an image in a CForm formbuilder array. But I want to show the model contents, something like this example:
array(
'elements'=>array(
'<img src="$this->thumbnail" />',
'thumbnail'=>array(
'type'=>'file',
),
),
)
Is that possible?
Found it, this works.
return array(
'elements'=>array(
'<img src="'.$this->getModel()->thumbnail.'" alt="" />',
'thumbnail'=>array(
'type'=>'file',
),
),
);