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."?

  • You should try writing a Template for Webform – Pravin Ajaaz Feb 21 '15 at 9:44
  • @darol are you having select list for user selection? – DEVARAJ JOHNSON Feb 21 '15 at 13:05
  • Yes @DEVARAJJOHNSON I'm using a select list. However, currently this is not connected to the user account. – itsdarrylnorris Feb 21 '15 at 23:37
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, privacy policy and cookie policy

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