-1

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.

closed as too broad by kiamlaluno Jan 29 at 12:34

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Flush all caches, double check that At Custom Webform module is indeed enabled. – No Sssweat Jan 26 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 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 at 8:49
  • Yes, install & enable the Devel module. Then use dpm($varname); to inspect variables. – No Sssweat Jan 28 at 8:58
2

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
    }
-2

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.

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