Cleaned and updated: function hms_ac_adm_form_alter(&$form, $form_state, $form_id){ drupal_set_message("Form ID is : " . $form_id); drupal_set_message("Form type is : " . $form['type']['#value']); // && ($form['type']['#value'] == 'sup_pt_visit') if (($form_id == 'sup_pt_visit_node_form') ) { // this is the form on-submit validation hook callback declaration drupal_set_message('Matched!'); $form['#validate'][] = '_hms_ac_adm_sup_pt_visit_node_form_validate'; $form['#submit'][] = '_hms_ac_adm_sup_pt_visit_node_form_submit'; dpm($form); } } /** * Implementation of hook_form_validate. */ function _hms_ac_adm_sup_pt_visit_node_form_validate(&$form, &$form_state){ watchdog('hms-validate', '
:Validate -' . print_r($form, TRUE) . ''); } /** * Implementation of hook_form_submit */ function _hms_ac_adm_sup_pt_visit_node_form_submit(&$form, &$form_state){ watchdog('hms-submit', '
:submit -' . print_r($form, TRUE) . ''); }