7939 Posts in 1472 Topics by 944 members
|Go to End|
3 November 2011 at 5:12am Last edited: 3 November 2011 5:26am
I have a custom made list of events made with the DataObjectManager. One of the fields (Comments) is using the SimpleTinyMCEField in the CMS pop up. Everything works fine except that the HTML tags are showing in the front-end.
Here's my code.
static $db = array (
'Place' => 'Varchar(255)',
'Date' => 'Date',
'Time' => 'Varchar(50)',
'Comments' => 'Text',
'Postcode' => 'Varchar(50)',
//Fields for the DOM Popup
public function getCMSFields()
return new FieldSet(
new DatePickerField('Date','Gig Date (for example: 20/12/2010)'),
new TextField('Time', 'Time (for example: 20.30)'),
new SimpleTinyMCEField('Comments', 'Comments'),
new TextField('Postcode', 'Postcode')
<% control EventDetails %>
<p>$Date.Nice - $Time</p>
<% end_control %>
I've tried to use Comments.XML but it didn't work, the tags still show up in the frontend.
I was wondering if there's a way to display the HTML correctly.
Thanks in advance!
I didn't realise that I had to useas type of field!
'Comments' => 'HTMLText'
Everything sorted now!
|Go to Top|