View more context

  1. $fields->insertBefore(new Tab('Root.Hero', 'Hero'), 'Main');
  3. $fields->addFieldToTab('Root.Hero', TextField::create('HeroSubtitle','Subtitle'));

@Brad.EH I think this is expected - you're adding a tab to "Main", then adding a new tab to Root.Main - which results in two Tabs named Main. What you're looking for on the first line is new TabSet (although ideally you'd use TabSet::create) (edited)

Tabs belong to TabSets TabSets can contain Tabs or more TabSets, Tabs contain Fields.

It's not quite that cut and dry though, since Tabs and TabSets both extend from FormField... it gets very esoteric and relies on developer convention and self management.

$fields->insertBefore(Tab::create('Hero'), 'Main');

  1. $tab = new Tab('Root.Hero', 'Hero');
  2. $tab->push(TextField::create('HeroSubtitle','Subtitle'));


  1. $fields->insertBefore(Tab::create('Hero'), 'Main');
  2. $fields->addFieldToTab('Root.Hero', TextField::create('TestField ','Test me'));

Works fine for me

Files: Requires logging in to the Slack workspace to view/download
wizards.jpg (JPEG)