Using hook_node_submit() from a custom module I have built a custom module named 'ABC'. I have created a content type 'CT' having some text fields. When a user add content of type 'CT' and Save/Preview the form, I want to use the values that the user added in the form and make a web service call and update the form values based on the data returned from the web service call which would further be saved to database.

I am using hook_node_submit() as below.

function CT_node_submit($node, $form, &amp;$form_state) {
  global $user;
  //dpm($user);
  $nameofuser = $user-&gt;name;
  $timezone = $user-&gt;timezone;
  $title = $form['field_title']['#value'];
  $pid = $user-&gt;uid;
  $pname = $user-&gt;name;
  $rurl = $form['field_recording_url']['#value'];
  $purl = $form['field_presenter_url']['#value'];

  $kdetails  = array (
     'nameofuser' =&gt; $nameofuser,
'title' =&gt; $title,
'pid' =&gt; $pid,
'pname' =&gt; $pname,
  );
  Make_A_WebService_Call($kdetails, $form, $form_state);
}


The problem is that when I am calling the above code from ABC.module file, the code is not being called on clicking the Save/Preview button.
hook_node_submit() will only be invoked for the module implementing the associated content type. If module A defines the content type, module B cannot implement hook_node_submit() on module A's behalf, unless it specifically calls the function module_B_node_submit().

If you want to hook into the validation process of a node form you can use the standard hook_form_alter(), e.g.

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'article_node_form') {
    $form['#validate'][] = 'MYMODULE_node_form_validate';
  }
}

function MYMODULE_node_form_validate($form, &amp;$form_state) {
  // Logic here...
}