getRecord($id ? $id : $this->currentPageID()); $form = parent::getEditForm($record, ($record) ? $record->getCMSFields() : null); // TODO Replace with preview button $form->Fields()->addFieldToTab( 'Root.Main', new LiteralField('SwitchView', sprintf('