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.
Is just me or the display of submitted form values in the generated e-mail is plain broken in 1.4 release ? :-)
It is anyway when you have the habit to give your components a textual value for 'form_key', instead of the default cid.
Attached is a fix that is probably more of a suboptimal hack, but seems to at least do the trick.
Patch is against -dev
Comment | File | Size | Author |
---|---|---|---|
webform.inc_.patch | 892 bytes | yched | |
Comments
Comment #1
quicksketchThanks as always yched :)
I'll see if I can come up with a cleaner solution, but this points me in the right direction.
Comment #2
john.money CreditAttribution: john.money commented+1 on patch... works for me too. There appears to be an extraneous line that is getting passed from $form_values['submitted_tree'], but I can live with it. Maybe the submit value??
Comment #3
yched CreditAttribution: yched commentedhttp://drupal.org/node/158555 was marked duplicate, but has a different patch.
I guess we'll let you pick, quicksketch :-)
Comment #4
pulpzebra CreditAttribution: pulpzebra commentedpatch provided seems to insert into message body N x N fields (where N is the Number of fields of the webform). That is, if my form is e.g. Name, Company, Address in the email body I actually see:
name
company
address
name
company
address
name
company
address
Trying to look at the code I see that
At the very bottom there is a foreach on each $value, while the collect of each webform field should be already done at the head of the new function.
It works for me by replacing
with
Comment #5
phoolish CreditAttribution: phoolish commentedPatch seems to work great. I also noticed that the default email subject doesn't seem to be sent. Instead it defaults to the none selection. I commented out starting at 1378 of location.module.
That seems to solve the problem.
Comment #6
scor CreditAttribution: scor commentedThis particular issue with the strcmp has been reported 3 times already. Here is the main thread : http://drupal.org/node/152165
Comment #7
yhager CreditAttribution: yhager commented+1 for the yched patch. This really should be included in the release ASAP, since IMHO it's a basic feature of this module.
Comment #8
BarisW CreditAttribution: BarisW commentedThis patch doens't really work well.
It only submits the values of the last page, if you use the BREAK element.
Comment #9
yhager CreditAttribution: yhager commentedI assume you mean 'emails' instead of 'submit'. If this is the case, then it is still better than what we have today, which seemed (to me after first impression) that this module is totally broken.
Comment #10
yched CreditAttribution: yched commentedWell, let's not dramatize, it's not *totally* broken. This is simply one (important) feature that is not working.
@Sixcolored : it's quite possible that my patch misses some stuff. AAMOF, even besides the issue you're mentioning, I am pretty sure it is not the proper way to fix that (suboptimal). It's only a share of the quick'n dirty hotfix I figured to make it work as I need it to.
Comment #11
dquakenbush CreditAttribution: dquakenbush commentedsubscribing
Comment #12
HorsePunchKid CreditAttribution: HorsePunchKid commentedSubscribing. This patch is working well for me, in conjunction with the
strcmp
patch. I'm not using breaks, but as has been said, this patch is at least an improvement over "not working at all".:-)
Comment #13
Periander CreditAttribution: Periander commentedThank you very much, this patch has fixed my issue with the problem.
Being a Drupal newbie, I struggled at first to realise where to start as far as adding this code went. However, for others in my boat I feel I should note, you simply need to highlight the lines that have a minus symbol '-', (line 231 in webform.inc in my case, but mentioned as line 232 in the code, so maybe I have a *slightly* different version), and then paste in all the lines with pluses next to them, '+', (and remove the pluses, and fix up your spacing/tabs to neaten it up).
Comment #14
scor CreditAttribution: scor commentedComment #15
richardroth CreditAttribution: richardroth commentedTried it and after several attempts, I finally got it working! Great job yched!
Comment #16
RoloDMonkey CreditAttribution: RoloDMonkey commentedsubscribing
I noticed that this patch turns my State drop-down list value of CT to ct in the email.
I use this module on a lot of sites. I hope this can be fixed soon.
Comment #17
GoofyX CreditAttribution: GoofyX commentedSubscribing...
Comment #18
RoloDMonkey CreditAttribution: RoloDMonkey commentedThis patch also does not fill in the default subject, "Form submission from: $title" in the email.
Comment #19
solutionsphp CreditAttribution: solutionsphp commentedThis patch doesn't seem to work for me. Drupal 5.2.
My webform-generated emails were not displaying the email subject or the form fields and data in the email body.
I applied this patch to fix the email subject line issue, and it worked fine:
http://drupal.org/node/152165#comment-276944
Next, I applied the patch from this thread, and now instead of seeing:
Submitted values are:
:
in my emails, I simply see:
Submitted values are
Colons are missing as well as data now!
There are numerous threads about this issue and all of them seem to go off in a different direction. Can we get a single support thread started that posts the correct patches for BOTH the blank email subject line and body consolidated into one, easy-to-understand thread?
Comment #20
sstacks CreditAttribution: sstacks commentedJust confirming this patch did fix my issues with the form fields not showing up in the email.
I still have the issue of a blank subject line, which seems addressed in other areas.
I am on Drupal 5.1.
Comment #21
HeinzS CreditAttribution: HeinzS commentedJust change this simple in webform.inc (or copy function to your own theme):
Thats all.
Comment #22
solutionsphp CreditAttribution: solutionsphp commentedChanging line 183 didn't work for me. I still see just:
in the resulting email. Any other ideas for howto output the form data in the email?
Comment #23
dquakenbush CreditAttribution: dquakenbush commentedDo you really need custom keys?
After fighting with this for a while I recreated my forms, and just used the field keys generated by the module. You can change the label, but don't touch the key. To get the subject I added a hidden field, then selected it in the appropriate drop-down. Worked like a charm on a number of different fairly complicated forms...
Comment #24
snickerbee CreditAttribution: snickerbee commentedDitto for me dquakenbush. If you use the auto generated keys then the email feature seems to work correctly. After submission though, I only get a blank page. I am struggling to get the correct page to appear after submitting the form.
Anybody got this figured out?
snickerbee
Comment #25
dquakenbush CreditAttribution: dquakenbush commentedI use a lot of local redirects -- seemed to work as expected out of the box.
In the "Confirmation message" box I disabled rich text and put internal:local/path/to/file ...
Comment #26
mo6Is there any progress on this bug? Can we expect a new release anywhere soon?
Comment #27
mo6The patch works partly (D5.2): fields containing an ampersand (in particular select fields with options containing an ampersand) are not mailed.
Comment #28
mo6The fix suggested in #21 works in D5.2. Only fields with ampersands are not mailed as noted in #27, I suspect this is a different issue.
Comment #29
coupet CreditAttribution: coupet commentedconfirm: receiving blank email
The csv results are OK.
Email message follows:
Submitted values are:
:
:
:
:
Note: Drupal 5.2 @ Webform 5.x.-1.x-dev on Sept 12 , 2007
Comment #30
mo6@coupet: what's your experience with 1.4 with #21 applied?
Comment #31
mennonot CreditAttribution: mennonot commented+1 on the patch in comment #21 which worked for me. However, I found that it didn't work to select to use [default] options for "E-mail from name:" and "E-mail from address:" and "E-mail subject:" fields. Instead I had to create hidden fields in the form and use those to populate the 3 of them. I don't know if this is related to the original bug or not.
Also, though the form values are coming through, I also get this at the end of the email:
Comment #32
mo6@mennonot: see http://drupal.org/node/152165
Comment #33
coupet CreditAttribution: coupet commented@ george@dynapres.nl
// $message .= theme('webform_mail_fields', '', $form_values['submitted_tree'], $node);
$message .= theme('webform_mail_fields', '', $form_values['submitted'], $node);
works now as per post 21, but the latest dev version 'submitted_tree' is only mentioned in line 187
Comment #34
steveoliver CreditAttribution: steveoliver commentedRedirect values "interal:contact_us/qsuccess.php" or "http:///contact_us/qsuccess.php" do not work to redirect after submit.. Webform emails the results, but doesn't redirect the visitor... any ideas?
Comment #35
mo6Please don't hijack this issue, you can file a new issue for your problem.
Comment #36
arbel CreditAttribution: arbel commented#21 worked for me great!
had Submitted values are:
with no : after or anything.
and now it works great.
Thanks!
Comment #37
lenart CreditAttribution: lenart commentedThe patch (#0) worked for me (Drupal 5.1, webform 1.4).
I tried and applied patch #21 (changed submitted_tree to submitted) but didn't work for me so I changed it back.
Thanks guys.
Comment #38
buddaI applied http://drupal.org/node/179155 and get most of the expected results in my emails.
Comment #39
neurojavi CreditAttribution: neurojavi commentedHi:
# 21 works for me (version 5.x-1.4)
Many thanks.-
Comment #40
AndrewJarvis CreditAttribution: AndrewJarvis commentedYes, #21 was what fixed it for me - just that one little change from "submitted_tree" to "submitted" only mine says it's line 187, not 183.
THANKS!
When will this fix be included in the current version of the module? Or is it now?
Comment #41
David Lesieur CreditAttribution: David Lesieur commentedPatch #21 seems to work. Let's dare mark it as RTBC and see what happens. ;-)
Comment #42
harryma CreditAttribution: harryma commentedline 183 fix worked perfectly!! been banging my head on a fix , the theming instructions did not work at all for me.
drupal v.5.2
Comment #43
quicksketchI've applied #0, as I believe this is the correct fix. Those that have applied #21, it only works adequately for those people that do not use fieldsets and nested fields. In those cases, the output isn't nicely indented or in the correct order. I'll release a new version of webform soon, as this problem has been plaguing users since 1.4's release. Thanks to everyone for their feedback.
Comment #44
(not verified) CreditAttribution: commentedComment #45
darumaki CreditAttribution: darumaki commentedis the first attachment a correct fix for the latest version ? I don't recognize any of it within the current webform, inc
getting confused more and more as I read all the various issues, so far I have not been able to get it to send anything
Comment #46
RoloDMonkey CreditAttribution: RoloDMonkey commentedAs far as I know, this was fixed in version 1.7. You do not need to apply the patch to version 1.7.
I just upgraded to 1.7 this week and it seemed to work fine. This ticket is closed. If you are having trouble sending email, please open a separate ticket.
Comment #47
druvision CreditAttribution: druvision commentedIn my website, webform still sends blank email bodies, in all versions.
See detailed description here: http://drupal.org/node/215137
Comment #48
Rowanw CreditAttribution: Rowanw commentedUse the other issue that you already created, don't reopen closed issues.
Comment #49
Rick at Monarch CreditAttribution: Rick at Monarch commentedJust an FYI. I added webform reports and my similar problem disappeared.
Rick Nashleanas
www.monarchdigital.com