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 Feb 21, 2015 at 9:44
  • @darol are you having select list for user selection? Feb 21, 2015 at 13:05
  • Yes @DEVARAJJOHNSON I'm using a select list. However, currently this is not connected to the user account. Feb 21, 2015 at 23:37

1 Answer 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);


// 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.