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.

Archive /

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

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

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

Go to End

3 Posts   1550 Views


Community Member, 15 Posts

5 August 2007 at 7:30pm

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

Community Member, 99 Posts

6 August 2007 at 12:30am

Edited: 06/08/2007 12:32am

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;


Community Member, 15 Posts

6 August 2007 at 2:47am

Thanks, that seems to have done it.