[development] Drupal 6, Webform submit query

Pete Dowdell pete at stridebird.com
Mon Oct 10 11:08:36 UTC 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20111010/eb8df3e8/attachment.html 


More information about the development mailing list