This is the method you need to call to add / remove / edit fields in the CMS. For a tutorial on how to add your own fields to the CMS see tutorial 2 which covers how to add fields to your page types
// add a another textbox under the Content tab $fields->addFieldToTab("Root.Content", new TextField("ExtraContent", "Extra Content")); // Make a new tab 'BioPic' and add a image field $fields->addFieldToTab("Root.BioPic", new ImageField("Picture", "Staff Photo"));
// remove the content text area $fields->removeFieldFromTab("Root.Content.Main","Content"); // remove the whole reports tab $fields->removeFieldFromTab("Root","Reports");
// Don't like the title for 'Content'? $fields->renameField("Content", "A better Title for Content");
Please use comments for notes, tips and corrections about the described
functionality.
Use the Silverstripe Forum to
ask questions.