6

I am developing a site which has many advertisers. The idea is to have a specific advertiser emailed when a user shows interest in their product.

To do that, I need to create one webform which will change the recievers address dynamically depending on the advertiser who posted the product of interest.

It sounds like a custom module solution but I need the opinion of those who know better than I do.

Thanks

4

As it turns out, webform 3 has the ability to create an email component which will serve as the recipient. All I then did was to copy the desired email address into the email field using JQuery. I did so dynamically on each user page and it works just fine.

  • Can I ask how you used JQuery to accomplish this? I'd like to do something similar, but I'm pretty new to Drupal. Thanks. – user5168 Jan 25 '12 at 13:51
  • Hi, it was pretty simple. The first thing is to dynamically discover the email address of the advertiser. Once you have that, just use jquery to copy out the address from whatever html element it is in and paste it into the relevant webform textfield. I would also hide the textfield so the user cannot tamper with it. All they have to do is fill in any other info and hit send. I hope this helps you. – sisko Feb 1 '12 at 16:04
3

Drupal 6 or 7?

I would do a custom module with a simple hook form submit in that webform (that must include some node id for later reference), then checks the node author account to grab his email and use drupal_mail to send the notification.

Otherwise, if you really don't want to code, maybe Rules module could fit in your case. It's some time ago that I don't use this module and don't remember all the possible triggers.

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.