I'm quite noob at drupal, i have a custom module with the function below:

function at_custom_webform_submission_presave($node, &$submission) {
// my code here

i don't know why, but it's seems that the function is not called... what's the problem ?

I tried to use an email function php and nothing happened. and when i tried the same thing with : at_custom_user_presave, i got an email.

So that's why i'm thinking that the function is not called anymore. Before it was.

The website use 7.61 version's drupal and 7.x-4.18 version's webform.

Thanks for helping.

  • Flush all caches, double check that At Custom Webform module is indeed enabled. – No Sssweat Jan 26 '19 at 1:47
  • To check whether the function is running or not, you could add drupal_set_message('Yes, it ran!'); inside the function. – No Sssweat Jan 26 '19 at 1:49
  • Where the message will appear ?, is there a way to dump variables ? because var_dump, die doesn't work. – Manuel Alvarez-Iglisias Jan 28 '19 at 8:49
  • Yes, install & enable the Devel module. Then use dpm($varname); to inspect variables. – No Sssweat Jan 28 '19 at 8:58

According to your sample code,to use hook_webform_submission_presave your module name must be "at_custom"

  1. Enable Webform module
  2. Enable your at_custom module
  3. Put your hook under your module file: 'at_custom.module'
    function at_custom_webform_submission_presave($node, &$submission) {
    // your code here
| improve this answer | |

I think i find why it was not triggered. the form was an user create form, no a webform. so that's why, thanks for the help.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.