How to extend (alter) webform submit function to add more funcitionality? I have created a webform, whose id is webform_client_form_1, I have 3 fields: 


  Name:
  Email:
  Phone number:


Now I want to extend webform submit function to send SMS to that Phone number. I have a working PHP script which sends SMS, using 3rd party service.

So my question is how to extend the submit function for webform? Is there any hook available or there is other method to do it?

Submit function for webform is: webform_client_form_submit
Just append your function to the #submit element to add it to the list of handlers.

MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if($form_id == 'webform_client_form_1') {
    $form['#submit'][] = 'webform_client_form_submit';
  }
}