Search code examples
drupaldrupal-7

Drupal Webform hook_webform_submission_insert not firing


I am trying to use the hook_webform_submission_insert in my theme template.php file. I have 2 other webform hooks currently running in here and they work just fine. I am trying to get the submission data after it has been submitted. Below is my code.

function acquarius_hook_webform_submission_insert($node, $submission){
    var_dump($node);
    var_dump($submission);
}

I am sure I am missing something small here but everything I try seems to fail.


Solution

  • You need to replace hook keyword with your theme name. Also add hook functions in module.

        YOURTHEMENAME_webform_submission_insert($node, $submission){
    // give your code here
    }