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

Override silver stripe default admin functionality


Go to End


2 Posts   809 Views

Avatar
sabi

Community Member, 1 Post

6 July 2013 at 7:46am

Hi,
I am new in SilverStripe, using version 3.5. I have a doubt in core silverstripe.
I need to override the default submit event in admin side of silver stripe?
I need to implement a new functionality like,
I have two tables, and when I try to insert a new value / delete a value from one table, then I need to automatically insert/delete that record from the other table. We can do it through writing rules in mysql, but the problem is that, I need to edit one of the field in the new table. So I need an interface for edit the second table. So i need to insert the record through Silver Stripe.

Thanks in advance.

Avatar
Nobrainer Web

Community Member, 138 Posts

6 July 2013 at 8:34am

Hi, i Think you are looking for the onBeforeWrite method (there is also one for delete) http://doc.silverstripe.org/framework/en/topics/datamodel

Add to your Page class or where you want to do something before the dataobject / record is saved.