Hi,
Has anyone got a quick snippet that will remove the 'back' button within ModelAdmin?
It would be very much appreciated
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi,
Has anyone got a quick snippet that will remove the 'back' button within ModelAdmin?
It would be very much appreciated
thanks to a little help from simon_w on IRC...
class MyModelAdmin extends ModelAdmin {
...
public static $record_controller_class = "MyModelAdmins_RecordController";
...
}
class MyModelAdmin_RecordController extends ModelAdmin_RecordController {
...
public function EditForm() {
$form = parent::EditForm();
$fields = $form->Actions();
$fields->removeByName('action_goBack');
$form->setActions ($fields);
return $form;
}
...
}