I have Drupal 7
site. It has custom module named say myproducts
. This module has following hook
function myproducts_form_alter(&$form, &$form_state, $form_id) {
if(isset($form_id) && $form_id=='product_node_form')
{
$form['#submit'][] = 'myform_form_submit';
}
}
function myform_form_submit(){
echo 'test submit handler'; exit();
}
But `myform_form_submit` is not getting called.
Any help highly appreciated.