1

When the user is fill out my webform they are going be asked "who refer you to this page." The user would pick a user. I want to be able to send the results e-mail to that person programatically once they have submitted their question.

So I'm looking for a module allow me to e-mail the webform results base on "who refer you to this page."?

3
  • You should try writing a Template for Webform Commented Feb 21, 2015 at 9:44
  • @darol are you having select list for user selection? Commented Feb 21, 2015 at 13:05
  • Yes @DEVARAJJOHNSON I'm using a select list. However, currently this is not connected to the user account. Commented Feb 21, 2015 at 23:37

1 Answer 1

1

I believe hook_node_presave() along with user_load() is your answer

something like this:

function hook_node_presave($node) {
if($node->type == 'webform') {

$uid = user_load($node->FIELDOFUID);

$uid->mail;

// do your mail send here with $uid->mail;

}

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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