I want to email a copy of the webform submission to a product dealer selected by a database query on the user-supplied zip code, using a custom database of dealers by zip codes and emails.
I created a hidden field "dealer_email" and made it an email to field.
I cannot figure out a one-step process to assign the dynamic email value to the field for submission.
I am currently using a page break after the zip code field, and using validation processing to assign the selected email address to a session variable, which is then grabbed by the dealer_email field, using %session[demail], on the second page of the form.
I have tried these methods to set the form dealer_email field value.
$node->webform['dealer_email'] = "email@domain.com";
$form_state['values']['dealer_email'] = "email@domain.com";
$form_values['submitted_tree']['dealer_email'] = "email@domain.com"; (this is only post-submission, right?)
It could be a piped pair for the regular conditional recipient feature, but there are over a thousand values and they change monthly, so conditional recipients is not the best approach.
Comments
Comment #1
quicksketchSorry you were not able to receive an answer to this request. Closing after lack of activity.
Comment #2
decibel.places CreditAttribution: decibel.places commentedheh - forgot about this thread...
I am using code like this in the Advanced> Additional Processing field, it works...
I am using $_SESSION variables to pass values to a confirm page...
Comment #3
shaunwo CreditAttribution: shaunwo commentedDid this code work for you? We have a similar request from one of our clients and we need to do something very similar... if this worked.
Please advise,
--
Shaun Worcester | senior webologist
design chemistry, llc | next generation web site design
p. 800 640 0424 x 105 | http://www.designchemistry.com/
Connect to me: http://www.google.com/profiles/shaun.daytonwebheads
Follow us on Twitter: http://twitter.com/daytonwebdesign
Become a fan on Facebook: http://www.facebook.com/daytonwebdesign
Comment #4
decibel.places CreditAttribution: decibel.places commented@shaunwo
that code was posted 1 1/2 years ago - it was tested before posting so it worked, of course you may need to customize it for your needs
hope it helps =)