Here is an example on using FieldGroup:
new FieldGroup( new FieldGroup( new HeaderField('FieldGroup 1'), new TextField('Firstname') ), new FieldGroup( new HeaderField('FieldGroup 2'), new TextField('Surname') ) )
function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab( 'Root.Content.Main', new FieldGroup( new TimeField("StartTime","What's the start time?"), new TimeField("EndTime","What's the end time?") ), 'Content' ); return $fields; }
Displays in the CMS like this.
Please use comments for notes, tips and corrections about the described
functionality.
Use the Silverstripe Forum to
ask questions.