Closed (fixed)
Project:
Webform
Version:
6.x-3.0-beta6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2010 at 22:02 UTC
Updated:
15 Sep 2015 at 20:01 UTC
Jump to comment: Most recent
Comments
Comment #1
ravervx commentedComment #2
quicksketchHooks may only be executed by modules, and so you'd need to make a custom module to put your implementation of hook_webform_submission_insert() into. I'd probably recommend using presave rather than insert though, in case the user saves a draft or later edits their submission.
Comment #3
ravervx commentedThanks for the pointer. I'm not sure how to make a module to process a webform form submission. Do I make a module with the hook_webform_submission_insert() or presave() function and that is it? When the form submits, it will automatically call the module and the hook functions?
Comment #4
quicksketchYes, hooks work just by naming your functions [module_name]_[hook_name]. I don't provide support on custom coding in the issue queues. I'd recommend the Pro Drupal Development book or the Lullabot Module Development DVD for learning how to write modules. I'm marking this fixed because it's outside the scope of the Webform issue queue.
Comment #6
d8v15 commentedSimilar issue. But what is needed is to add javascript to the page after/on insert that calls an api function on another server.
What hook to use and how to add that javascript ot the page through the hook. It will need access to the form data.