Closed (fixed)
Project:
Webform
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2008 at 05:01 UTC
Updated:
26 Nov 2008 at 16:57 UTC
Jump to comment: Most recent file
Comments
Comment #1
djalloway commentedagreed, this would be a VALUABLE feature
Conceptually it doesn't sound that difficult to do either, I just wish I knew more about coding to be able to give it a shot myself.
Ideally you'd have another checkbox on the component page that you could check to "Include in Email Submission" or something to that extent.
Comment #2
quicksketchSounds reasonable (and even easy enough) to include as a feature. It'd be great to just have a checkbox just like the "Mandatory" checkbox on the overview page to include components in the e-mail or not.
Comment #3
quicksketchHere's a fully working patch for the 5.x branch. It requires a database update to add the new "email" column to the webform component table. Please give a try! I'll port it to 6.x after this has been tested for 5.x.
Comment #4
will_in_wi commentedI would suggest a different approach. What about allowing the admin to create a custom email that uses the token module to insert not only what he/she wants but also where.
My use case is a church website where I have a webform as a VBS signup sheet. When a user signs up, I want to email a nicely formatted message containing useful information. This requires not only filtering out unneeded fields, but also rearranging the whole email.
Comment #5
quicksketchwill_in_wi, I'd like to avoid that approach because it'd require the user to always "theme" the email every time they add a new field. If you want to configure the e-mail with a layout, you can already override the theme_webform_mail function. In Drupal 6 this will likely be converted to a tpl.php file to make the process easier.
Comment #6
will_in_wi commentedI think you can do this in an elegant way without requiring the user to retheme everytime a field is added. Add a multiline textbox that is collapsed by default. If the admin modifies this textbox, they can retheme the email, but they would have to modify it to add a new field. If the textbox is blank then the current method is used which would automatically add the field to the email. I think this would provide a good balance.
I use garland and other stock themes on the few sites I use, and I attempt to keep patches down to a minimum. I do not think I can modify a single form without modifying the theme. Also, if I train another admin who is capable of creating webforms, but is not capable of modifying php, they cannot modify a stock email.
If there is a simple way to do this that does not involve modifying a theme (for the reason stated above) or creating a module (I have done this, but it would be a pain for every form, and quite impossible for john q. webadmin), I would really appreciate knowing.
Comment #7
quicksketchI'll have to hear from djalloway. As he's sponsoring the feature. It's implemented now as the issue describes. Providing a built-in template editor for e-mails is a different scenario.
Comment #8
will_in_wi commentedHere is a patch for the feature I am talking about. It is complete except for a modification of all of the theming components to just output the value and not the name: value.
I don't know if this is the best way to do this. I would really appreciate constructive criticism. Should I open a new issue for this patch?
Comment #9
UnicornSong commentedThank you quicksketch you are a legend!
Comment #10
quicksketchI went ahead and applied to both the Drupal 5 and 6 versions of Webform 2.x. You should be able to download the development version shortly (it usually takes a day) that includes the new feature, or just checkout from CVS. Please re-open this issue with any problems you experience.
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #12
Breen commentedI know this is a closed issue, but would this feature allow the line ""The results of this submission may be viewed at:" to be removed from the webform email?