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'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.

Data Model Questions /

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

Adjust position of ToggleCompositeField in CMS


Go to End


816 Views

Avatar
Michiel

Community Member, 2 Posts

14 November 2014 at 11:15pm

I’m trying to adjust the position of a ToggleCompositeField and all of its children in the CMS field order. With a ‘normal’ field (myTextField) I would do something like:

public function getCMSFields() {

 $fields = parent::getCMSFields();

//other fields...

$fields->addFieldToTab('Root.Main', $fields->dataFieldByName('myTextField'));

How can I do this with a ToggleCompositeField?