Prefix and Suffix of number components are printed twice when viewing a submission (s. attached screenshot).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Thanks, I've confirmed this problem. I'll try to handle it next time I'm going through bugs in the queue.

sidharthap’s picture

I 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.

bjlewis2’s picture

Status: Active » Needs review
FileSize
651 bytes

I haven't tested this, but I turned #2 into a patch, so that it can be tested, and hopefully integrated! :)

bjlewis2’s picture

Oops... Just realized that I patched that against 4.x... I'll make one for 3.x as well.

bjlewis2’s picture

Here's the patch for 3.x

sidharthap’s picture

Thanks for the patch, i think we can remove $prefix and $suffix from the function 'theme_webform_display_number' as well.

quicksketch’s picture

Status: Needs review » Fixed
FileSize
800 bytes

Hi 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.