How do I overwrite the particular webform submit event in template.php? I want to control a particular webform submission event, and I am trying to use the following function in my template.php file.

function bartik_form_webform_client_form_7_submit(&amp;$form, &amp;$form_state) {}


The function is not working. How can I achieve this?
Try hook_form_alter() or hook_form_FORM_ID_alter(). This will help you to alter the array of the submission handlers and add a new submission handler.

function hook_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if($form_id == 'Your-Webform-ID') {
    $form['#submit'][] = 'custom_settings_form_submit';
  }
}

function custom_settings_form_submit($form, &amp;$form_state) {
  // Your code here.
}