Closed (fixed)
Project:
Webform
Version:
7.x-3.18
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 May 2012 at 12:53 UTC
Updated:
3 Jul 2013 at 07:10 UTC
Jump to comment: Most recent file
Prefix and Suffix of number components are printed twice when viewing a submission (s. attached screenshot).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | webform_numeric_prefixes-1601948.patch | 800 bytes | quicksketch |
| #5 | RemoveDuplicatePrefixandSuffix-1601948-5.patch | 651 bytes | bjlewis2 |
| #3 | RemoveDuplicatePrefixandSuffix-1601948-3.patch | 651 bytes | bjlewis2 |
| number-suffix.png | 23.17 KB | djs |
Comments
Comment #1
quicksketchThanks, I've confirmed this problem. I'll try to handle it next time I'm going through bugs in the queue.
Comment #2
sidharthapI have the same issue. I corrected the file webform/components/number.inc at line 340. Replace return $value !== '' ? ($prefix . $value . $suffix) : ' '; with return $value !== '' ? $value : ' ';
The prefix and suffix already there in the function '_webform_display_number()''
Hope it helps you.
Comment #3
bjlewis2 commentedI haven't tested this, but I turned #2 into a patch, so that it can be tested, and hopefully integrated! :)
Comment #4
bjlewis2 commentedOops... Just realized that I patched that against 4.x... I'll make one for 3.x as well.
Comment #5
bjlewis2 commentedHere's the patch for 3.x
Comment #6
sidharthapThanks for the patch, i think we can remove $prefix and $suffix from the function 'theme_webform_display_number' as well.
Comment #7
quicksketchHi guys, based on the textfield component, I think we should adopt the same approach there; otherwise you end up with the prefix/suffix missing in the e-mails. Here's a patch that effectively does the same thing, but only affects the HTML version of the number component. Committed to the 7.x versions.