I'm trying to figure out how to add an option on my CMS editor page, sidebar content. So far I've done this:
function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->addFieldToTab(
"Root.Content.Sidebar",
new HTMLEditorField('SideContent','Sidebar content'));
$fields->addFieldToTab(
"Root.Content.Sidebar",
new OptionsetField(
'ShowSocial',
$title = 'Show social widgets on this page',
$source = array(
'1' => 'show','2' => 'hide'),
'1'
));
return $fields;
}
In my page controller, which shows the controls but doesn't save their state when I click save. What am I missing?