Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

page types with two HTMLEditorField types do not display the label for the second one


3 Posts   1422 Views


5 August 2007 at 7:30pm Community Member, 15 Posts

I have the following page code and while the HTMLEditor textarea for the second field displays, the label for it does not. Attached is my page code and the edit interface screenshot.

Nathan Cox

6 August 2007 at 12:30am (Last edited: 6 August 2007 12:32am), Community Member, 99 Posts

HTMLEditorFields and TextareaFields don't seem to show a title unless you specify one, which is acutally pretty handy if you want a bigger space to edit in.
Adding a title parameter to HTMLEditorField will do what you want:

function getCMSFields() {
   $fields = parent::getCMSFields();

   $fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('Sidebar', 'Sidebar'), 'Content');
   $fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');

   return $fields;


6 August 2007 at 2:47am Community Member, 15 Posts

Thanks, that seems to have done it.