unclecheese / silverstripe-gridfield-betterbuttons

Adds new form actions and buttons to the GridField detail form

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Action won't fire when DataObject edit form is dirty

KINKCreative opened this issue · comments

I have the custom action implemented on a DataObject. I'd like to use it to refresh the DataObject edit page (under a Model Admin, that is), post some values which are not part of the model (e.g. 2 additional fields), and redo the view.

If the fields are intact, the custom action works. The moment I touch any of the fields, the custom action isn't firing.

public function getBetterButtonsActions() { $fields = parent::getBetterButtonsActions(); $fields->push(BetterButtonCustomAction::create('apply', 'Apply') ->setRedirectType(BetterButtonCustomAction::REFRESH) ->setSuccessMessage('Denied for publication') ); return $fields; }