Modifying form actions in GridFieldDetailForm

108 views
Skip to first unread message

drzax

unread,
Aug 8, 2012, 7:12:55 PM8/8/12
to silverst...@googlegroups.com
Yesterday I set about creating a new DataObject related to a Page which can be independently versioned (i.e. have a draft and published version).

When attempting to add a Publish button to the CMS, overriding the getCMSActions function on the relevant data object did nothing (which is less than what I expected). When digging into the reason I was surprised to find this line: https://github.com/silverstripe/sapphire/blob/3.0/forms/gridfield/GridFieldDetailForm.php#L316

Since this doesn't seem unconsidered and is a significant departure from what I think of as a standard pattern in Silverstripe, I'm sure there's a good reason. Can someone enlighten me and does this mean custom actions in GridDetailForms aren't possible?

Cheers,
Simon
Reply all
Reply to author
Forward
0 new messages