buttondrupal-7hook-form-alter

Workbench hook_form_alter changes


I am using the Workbench suit of modules and I have a simple change to make to node-edit forms.

I simply want to alter the labels on the buttons at the base of a node add/edit page to something more customized for our purposes.

enter image description here

The image above shows my attempts to re-label some buttons on a node/add page. Using hook_form_alter, there is only access to Drupal's native set of buttons - I am able to edit the PREVIEW button to TESTING PREVIEW.

However, I cannot seem to find a way to edit the workbench module related buttons - Send to moderation and Save as draft.

Can anyone offer suggestions on how to access these extra buttons?


Solution

  • Actually, the best solution turned out to be a custom module.

    The issue preventing me from seeing the data for the Send to moderation and Save as draft buttons was due to the weight of my module.

    Using the Modules Weight module to my modules weight appropriately so that it executes after the Workbench modules then allows my module to see and adjust all the data other modules add, for example, button labels, visibility etc.