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.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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;
}
Thanks, that seems to have done it.