How to register Post Submit handler for form?
I added the following snippet in hook_form_alter:

array_unshift($form['#submit'], 'callback');
foreach ($form['actions'] as $action =&gt; $values) {
    if (isset($form['actions'][$action]['#submit']) &amp;&amp; is_array($form['actions'][$action]['#submit'])) {
        if (!in_array('callback',$form['actions'][$action]['#submit'])) {
            array_unshift($form['actions'][$action]['#submit'], 'callback');
        }
    }
}


This registers to all actions.