function workflow_extensions_form_submit in Workflow Extensions 6
Same name and namespace in other branches
- 7 workflow_extensions.module \workflow_extensions_form_submit()
Handler for the single-action submit buttons on the edit form. Does NOT get called when radio buttons or drop-down are used.
1 string reference to 'workflow_extensions_form_submit'
File
- ./
workflow_extensions.module, line 285 - UI-related improvements to the Workflow module and tokens for Rules.
Code
function workflow_extensions_form_submit($form, &$form_state) {
// In the original form_submit handler that we pass control to next, the
// selected workflow state is taken from form_state['values']['workflow']. So
// that's the entry we need to set here in accordance with the clicked button.
// See node_form_submit() -> node_submit() for the edit form.
// See workflow_tab_form_submit() for the Workflow tab.
$form_state['values']['workflow'] = $form_state['clicked_button']['#to_state'];
// ... now proceed to next handler, e.g. node_form_submit for a normal save
}