php - form submit hook handler not getting called in drupal -


i have drupal 7 site. has custom module named myproducts. 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` not getting called.

any highly appreciated.

i don't see errors. make sure clear cache using drush(drush cc all) or through drupal's ui. after echo $form_id make see what's actual value of is. recommend using devel module. it's great debugging!


Comments