Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Admin form customisation


Go to End


3 Posts   1343 Views

Avatar
MatthewW

Community Member, 7 Posts

20 August 2015 at 4:37pm

I have an administration form in my module with a couple buttons at the bottom. I can see how to override getCMSActions() to add on a button and form action and I have this working. However, I want to change the behaviour of the "Save" button. I'm not looking to make a big change -- just to redirect on successful submission. I don't know how to do this as I have no idea where the method is that handles the form submission action. I'm assuming that I can override the method if I know what it's called. Any hints?

Avatar
Pyromanik

Community Member, 419 Posts

21 August 2015 at 1:12am

Do something in onAfterWrite.
Or if it's not your object, read docs on DataExtension

Avatar
MatthewW

Community Member, 7 Posts

21 August 2015 at 10:31am

Excellent, that works thanks. I think my mental model just tunes out methods like this on model classes.