Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
HI folks,
I'd love to see an autoresponder option for an individual webform. The scenario - user fills out form, email is sent to admin, and autoresponse is sent to user.
Thanks,
Dan
Comments
Comment #1
BarisW CreditAttribution: BarisW commentedThat would be great indeed! Looking out for that :)
Comment #2
BarisW CreditAttribution: BarisW commentedThat would be great indeed! Looking out for that :)
Baris Wanschers
Sixcolored
Comment #3
gvdvenis CreditAttribution: gvdvenis commentedI think that autoresponder is not a correct description for this. An autoresponder responds to an incoming message, This would me more like a confirmation message i guess... You could have a look at the actions module. I believe that with this module it's possible to send out an email as a reaction to certain events like submitting webforms... The only complication would be how to get form data in the E-Mail sent by the action module... Just a few late night thoughts...
Comment #4
seakayjay CreditAttribution: seakayjay commentedI'm looking forward for this feature as well.
Comment #5
mtndan CreditAttribution: mtndan commentedHi again,
I'm running Drupal 5.1 and I was able to accomplish this by putting the following code in the "Advanced Settings" -> "Additional Processing" field:
Works great!
Comment #6
seakayjay CreditAttribution: seakayjay commentedThank you so much. This is what I'm looking for.
Comment #7
seakayjay CreditAttribution: seakayjay commentedI know there is a way that you can display the form data in the autoresponder email? Base on the code provided by mtndan, I'm able to get the form data in textfield to display in email. But how to do I display the data for select and date components? Because the data display code provided won't work for select and date components.
Basically, what i'm trying to do is to send an autoresponder email to the form user with all the results of the data that he/she submitted.
Anyone can help?
Comment #8
seakayjay CreditAttribution: seakayjay commentedany support for this? my boss gave me another 2 days to figure this out. All I have to do is to display the data for both select and date components on the mail message.
Please... anyone? i'll really appreciate it.
Comment #9
seakayjay CreditAttribution: seakayjay commentedIt's OK now. I managed to get the data displayed mail message.
For date component:
<?php $form_values['submitted']['dob']['day']."/".$form_values['submitted']['dob']['month']."/".$form_values['submitted']['dob']['year'] ?>
For select component (I did it in a long way but I believe there is another way to do this):
Ok... thank you all. webform is a nice module.
Comment #10
gvdvenis CreditAttribution: gvdvenis commentedHere is the code, To get it to work, do the following:
Define a form containing:
- Select field: "Name" (Single select)
- Select field: "Hobbies" (Multi select)
- Date field: "Birthday"
Put the following code into the "Advanced Settings" -> "Additional Processing" field:
After this take a day off, and tell your boss you're working out this problem :)
Regards,
Gert
Comment #11
seakayjay CreditAttribution: seakayjay commentedThank you Gert. Now I can take a rest today. =)
Comment #12
mtndan CreditAttribution: mtndan commented&uotHi again folks,
I'm attempting to get this working to send an html email. The changes I've made are below. It doesn't seem to be working, so any ideas would be appreciated! Thanks!
Comment #13
seakayjay CreditAttribution: seakayjay commentedi think you miss out
\
before"
in<a href="http://www.come2coloradosprings.com\">www.Come2ColoradoSprings.com</a>
Comment #14
quicksketchComment #15
ira42 CreditAttribution: ira42 commentedI had this code working beautifully with D5.x, but I think the drupal_mail syntax has changed in D6.x.
Any chance that someone's got this working in Drupal 6 and could share the updated code?
Tx!
Comment #16
waynedrupal CreditAttribution: waynedrupal commentedInstead of having an email componant and using that to send to user, I have the webform only for registered users. So, I would not have :
and hense, not have
$to = $fromEmail;
but I would want the form to go to the registered user who is logged in and filling out form. What would I put in$to = $registered user;
for this to be sent to the registered user?I have tried
$to = $user;
but that did not send the email to the registered user. Any suggestions please?Thanks.
Comment #17
waynedrupal CreditAttribution: waynedrupal commentedHi. I have entered this into Additional Processing, but it does send an email to the person filling out the form.
I am using Webform 5.20 on Drupal 5.7.
The two componant names I am using are "E-mail Address" and "Name" (without quotes). Should "valid_email_address" be something specific here?
Is there anything that I need to change that should be customised to my configurations (such as $node->webformcomponents to something else)?
The only thing I can think of is in the Advanced Settings, Additional Processing, there is not an option for Input Types, to select php code option. Does webform automatically know to use php code for the Aditional Processing?
Any help would be appreciated. Thanks!
Comment #18
waynedrupal CreditAttribution: waynedrupal commentedMy thoughts about the php code within input formats is invalid because I have successfully been able to get following to work:
But how do I get the other to work so that message gets sent to email address that is filled in email component?
Comment #19
jarkko CreditAttribution: jarkko commentedTry $user->mail, that works for me. Remember put: $global $user; before that line!
edit: this reply is for post #16.
Comment #20
Glowingtree CreditAttribution: Glowingtree commentedHey, this is just what I'm looking for. (re: mtndan's post 5 and 12) Do you mind making a distinction
from the over-all code values needed and the ones that only pertain to your form?
i don't know what values to bring in from my specific form. i am not using any email
validation snippet or duplicate fields for email addresses. All I really need is the email address
that people put into my form-component that I named "email" to show up for the " $to= " variable that is a part of drupal_mail function.
I would be happy to get just that working and a plain text string for the message
Comment #21
mtndan CreditAttribution: mtndan commentedHi Glowingtree,
The only values that pertain to the form specifically are:
$component['name'] == "E-mail Address"
$component['name'] == "Name"
These are actual webform fields in my form.
(and the actual autoresponse text)
Comment #22
Glowingtree CreditAttribution: Glowingtree commentedi put the code below in the additional processing field in Webforms settings,
in its most simple form. I do not have any email validation field or code happening,
so I omitted
&& valid_email_address($value)
from the first IF linestill does not send a test email after I fill out the form (i'm filling out form tests
using my drupal admin account, using a seperate test email)
did I miss anything?
the name of the user email field is "email"
Comment #23
mtndan CreditAttribution: mtndan commentedHave you confirmed the site sends out other emails normally, like new user notifications?
Comment #24
Glowingtree CreditAttribution: Glowingtree commentedyep, creating dummy accounts gets the emails sent pretty fast.
I tried setting up Actions module (5.x vers) to do an auto-response email in
conjunction with, but submitting a webform doesn't show up
as one of the "action triggers"
Comment #25
mtndan CreditAttribution: mtndan commentedSorry, I'm stumped...
Comment #26
Glowingtree CreditAttribution: Glowingtree commentedif the code I'm showing you looks correct to you, than there is probably some
weird module conflict, can't they just all get along!! I have Logintoboggan,
it does auto-emails, maybe its getting in the way of this.
Comment #27
morganchad CreditAttribution: morganchad commentedI've referred to this page several times wondering why I couldn't get it to work - forgetting that it was Drupal 5.x and I'm using 6.x. It seems others here have had the same problem.
A quick search filtered by version and for confirmation email instead of auto-responder (which is the correct terminology as noted above) solved the problem. Here is the page that fixed it for me
http://drupal.org/node/333707
It's nice doing this through themeing and much more powerful that trying to use the advanced settings as described in this thread.
Comment #28
MohammadMoussa-Lebanon CreditAttribution: MohammadMoussa-Lebanon commentedsorry this is really what i want but please can you till me where i can place this code ??!!:S:S:S im a new drupal user and i dont know where to put this code.i just want also to ask if can i send activation link in this email. thanks alot man,
Comment #29
quicksketchEverything in this issue is completely unnecessary if you're using the 3.x version of Webform. Webform 3.x can now send out individual e-mails to the administrator and user with separate templates, all from the UI without writing any code. I'm closing this issue again as it's no longer relevant to current users of Webform.
Comment #30
chandu7ee CreditAttribution: chandu7ee commentedHi
i added below code in Webform advanced settings --> Additional Processing
i created a page with a name as thank you. and added this url to the web form under
Confirmation message or redirect URL:
http://mycomp.com/content/thank-you
but after submitting my form., it shows a blank white page with url as form url.
how can i redirect user after form subnitting? any idea? please help me as soon as possible.
here confirmation email to user working properly. user was able to get a response after each form submission.
Chandu
+91 9989902757
Comment #31
quicksketchI highly discourage the use of the Additional Processing fields (which is why they're removed in the 3.x versions). Support on using them is not provided.
Comment #32
jakemonO CreditAttribution: jakemonO commentedThis is great! Thanks! How do I send an email (thank you email) to an anonymous user that has filled out an e-mail address field (required)
Comment #33
EvanDonovan CreditAttribution: EvanDonovan commentedWhat would be the new approved method? Rules + Mime Mail?