Change the submit function I am using VBO and I want to change the submit function on my form. I have tried the following code:

function a_views_bulk_operations_form_alter(&amp;$form, &amp;$form_state, $vbo) {
  if($form_state['step']=='views_bulk_operations_confirm_form'){    
    $form['#submit'] = 'a_myfunc';
  }
}

function a_myfunc(&amp;$form, &amp;$form_state, $vbo) {
  dpm('Hit');
}


The a_myfunc is not hit. Instead I go to the normal VBO processing page. How can I change the submit function>
You're overriding wrong submit handler, normally VBO submit handlers are available under $form['select'] key in $form array. You can confirm this in your case by printing $form in hook_form_alter(). Make sure to use proper form ID as well before using, you can confirm form ID by printing $form_id variable available in hook_form_alter(). Below is example of altering VBO Form and overriding submit handler (In my case I've only one submit button).

/**
 * Implements hook_form_alter().
 */
function [MODULE_NAME]_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  // Confirm $form_id before using.
  // echo "{$form_id}&lt;br&gt;";
  switch ($form_id) {
    case 'VBO_FORM_ID':
      // In VBO, normally submit handlers are available under 'select' key.
      $form['select']['submit']['#submit'] = array('MODULE_NAME_vbo_submit');
      break;
  }
}

/**
 * Submit handler for Views bulk operations.
 */
function MODULE_NAME_vbo_submit($form, &amp;$form_state) {
  // Do your processing here.
}