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:

Customising the CMS /

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

Admin field seperation


Go to End


2 Posts   1328 Views

Avatar
MichaelGMorgan

Community Member, 7 Posts

2 September 2009 at 2:41am

I have a tab in the admin panel (extended on the Page class) called "Misc". I want to add to it 6 new fields but I need the to be visually divided.

For example...

Field1
Field2
<hr/>
Field3
Field4
<hr/>
Field5
Field6

It can be as simple as a horizontal rule or if possible, something a bit nicer (maybe a box with a heading (but not another tab)).

Thanks

Avatar
zenmonkey

Community Member, 545 Posts

2 September 2009 at 1:05pm

Edited: 02/09/2009 1:07pm

Check this link
http://doc.silverstripe.org/doku.php?id=form-field-types#structure

and

http://doc.silverstripe.org/doku.php?id=form-field-types#dataless_utility

You should be able to group your fields with

new FieldSet (
new FieldGroup(
new HeaderField("this is my header", 2),
put your fields here
),
new FieldGroup(
put your fields here
)
);