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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Add new field to tab but under the label.

Go to End

5 Posts   992 Views

Trevor Wistaff

Community Member, 3 Posts

15 October 2012 at 3:11pm

I added new HtmlEditorField(s) to the main tab and all is fine.

However, the label for the field is floated to the left instead of sitting above the field like the default "Content" field.



Trevor Wistaff

Community Member, 3 Posts

21 October 2012 at 1:10pm

Can anybody provide some insight?

Trevor Wistaff

Community Member, 3 Posts

29 October 2012 at 5:50pm

Bumpity bump


Community Member, 2 Posts

11 June 2013 at 9:54pm

Edited: 11/06/2013 9:57pm


I too was looking into how to make the HTMLEditorField underneath the label, and after playing around with CSS in Developer Tools in FireFox,
I have found out that the default "Content" Field has a class named "stacked" added to the

<div id="Content" class="field htmleditor stacked">
but in the other HTMLEditorField(s) that developers add using $fields don't. I will figure out how to get those added by $field stacked and let you know how I go.

for now you can add custom javascript

where #Content is the id of the div you added


Community Member, 187 Posts

11 June 2013 at 10:32pm

You don't need to use Javascript to add a class at all.

In getCMSFields(), do the following:

$myField = new HTMLEditorField('MyHTMLField', 'My HTML Field');