All pastes #2050545 Raw Edit

Untitled

public php v1 · immutable
#2050545 ·published 2011-04-25 17:39 UTC
rendered paste body
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', <pre>:Validate -' . print_r($form, TRUE) . '</pre>');   	}/** * Implementation of hook_form_submit */function _hms_ac_adm_sup_pt_visit_node_form_submit(&$form, &$form_state){   watchdog('hms-submit', '<pre>:submit -' . print_r($form, TRUE) . '</pre>');   	}