Re: Drupal 6, Webform submit query

Pete Dowdell <[email protected]>
Newsgroups gmane.comp.php.drupal.devel
Message-ID <[email protected]>
On 10/10/2011 10:43, Prajwala Manchikatla wrote:
> Hi Rohit,
>
> This is a support request, so it should go to support mailing list.
> You can write your custom submit handler by using hook_form_alter.
>
> function MODULE_form_alter(&$form, &$form_state, $form_id)  {
>   if ($form_id == 'webform_client_form_4') {
>     $form['#submit'][] = 'custom_form_submit_handler_function'; // 
> Note that this function will be called after the default webform 
> submit handler
>   }
> }

First post, hello all.

And to use only a custom handler:
   if ($form_id == 'webform_client_form_4') {
     // remove all handlers:
     unset($form['#submit']);
     // add alternative handler:
     $form['#submit'] = array('custom_form_submit_handler_function');
   }
would work too, no?

pd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.