Silverstripe Version: 5.0
Question:
Is there any events to hook into for after a DataObject has been saved?
I show/hide some fields with js onload and on click. Clicking save, saves the form but doesn’t fire onload again.
At the moment I have a click event on the save button with a setTimeout
it works but is pretty crude…
....
$.entwine('ss', function($){
$('#Form_ItemEditForm_action_doSave').entwine({
onclick: function(e) {
this._super(e);
setTimeout(function()
{
toggleFeatures();
}, 2000);
}
});
});
....
Is there a better way to do this in js or any way to know when it’s after save?