Jump to:

23552 Posts in 19380 Topics by 2891 members

General Questions

SilverStripe Forums » General Questions » Override silver stripe default admin functionality

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

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

Page: 1
Go to End
Author Topic: 336 Views
  • sabi
    Community Member
    1 Post

    Override silver stripe default admin functionality Link to this post

    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.

  • Nobrainer Web
    Community Member
    135 Posts

    Re: Override silver stripe default admin functionality Link to this post

    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.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.