Closed (fixed)
Project:
Webform
Version:
6.x-2.9
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2009 at 21:14 UTC
Updated:
21 Dec 2009 at 08:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchI'm not sure what you mean by "Advanced Feature for the textfield component". You should be able to add a "Field suffix" option to show the phone number if you like, this does not show up in generated e-mails.
Comment #2
ecsmike commentedThank you for your reply.
I am confused about the "Field Suffix option" you mentioned. I am using version 6.x.2.9 of the Webform module and see nothing like that. I used the "Label placed to the right of the textfield:" option for the Phone textfield component and it most definitely shows in the email.
Please see the attached file to view the contents of the email.
ecsMike
Comment #3
quicksketchEr... as far as I know there is no "Label place to the right of the textfield" nor is there even a "Phone textfield" component. Are you sure this field is provided by Webform?
Comment #4
ecsmike commentedSorry for confusing you. The "Phone" textfield is just a textfield to enter a phone number in.
But this is definitely the WebForm module.
Please see attached screenshots of the Admin page for configuring the Webform textfield component and the resulting form.
Thanks . . . Mike
Comment #5
quicksketchOkay thanks for your persistence here, you're right. "prefix" and "suffix" is what they're called internally by Webform.
Now that I think about it, the prefix/suffix is intentionally placed there in the e-mail, since it's intended to be used for things like "lbs.", "kg.", or €. The same goes for the prefixes, which are intended to be something like $.
So... how to get rid of it if you don't want it there?
You can do this by overridding the theme function for textfields in e-mails. Open up the webform/components/textfield.inc file, and find the "theme_webform_mail_textfield" function. Copy this entire function into your theme's template.php, then remove the field_prefix and field_suffix.
Comment #6
ecsmike commentedquicksketch:
Thanks so much for sticking with this.
I tried the fix you recommended but when I tried to open the site after copying the function into template.php, the site would not open due to the following fatal error:
Fatal error: Cannot redeclare theme_webform_mail_textfield() (previously declared in /home/user_name/public_html/sites/all/modules/webform/components/textfield.inc:173) in /home/user_name/public_html/sites/all/themes/proneema/template.php on line 20
Did I do something wrong?
Thanks again . . . ecsmike
Comment #7
quicksketchSorry I didn't mention a crucial step: Copy theme_webform_mail_textfield() to template.php, then rename the function. Replace the word "theme_" with the name of your theme, such as "garland_webform_mail_textfield" if you were using Garland for example. Then clear your Drupal cache by clicking "Clear all caches" at the bottom of 'admin/settings/performance'.
Comment #8
quicksketch