It'd be nice if other modules could use a hook to validate or process a submitted form. i.e. hook_webform_validate($form, $form_state) and hook_webform_process($form, $form_state) maybe. I'm using webform module a lot and it'd be nice if I could validate forms in my own module instead of having to cut and paste a validation function php snippet (even if its a call to one in my own module) from one form to the next.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | webform_hooks.diff | 1000 bytes | omerida |
Comments
Comment #1
omerida commentedAttached is a patch that creates 2 hooks:
hook_webform_validate($form, $form_state) and hook_webform_submit($form, &$form_state)
Comment #2
quicksketchThese hooks are unnecessary, since you can already add additional validate and submit handlers using hook_form_alter().
Comment #3
omerida commentedthanks - i didn't realize you could have multiple validate and submit handlers for one form
Comment #4
quicksketch