Hello- first of all great module- I've been very impressed with the speed of which your beta's are coming along!

Here's what i've noticed:
When i create a new webform and add a SELECT form component then go to enter the options, if i put the options in groups as such:


0|CCTV
1|Access Control
2|Bus Video Surveillance
3|Mobile Asset Tracking
4|Other: Specify Below

5|Portable Two-Way
6|Mobile Two-Way
7|Repeaters/Fixed Equip
8|Used Equipment
9|Accessories
10|Other: Specify Below

11|GPS Fleet Management
12|Wireless Clocks
13|Other: Specify Below

14|FCC Licensing
15|Maintenance and Service Requests
16|Tower Leasing
17|Other: Specify Below

This seems to prevent the selected options from being output inside %email_values in emails sent. The received emails only show the name of the form component and ":" then nothing.

This seems to ONLY happen if the select component is set to display as a "listbox"
This happens whether multiple options are selected or not.

I did just upgrade from 6.x-3.0-beta2 to 6.x-3.0-beta4, so i'm wondering if this is "just me." I unfortunately cannot confirm that this wasn't happening with beta2 as well. Running update.php went fine with no errors.

I appreciate any feedback or questions! Thanks for everything you do!

Additionally, I noticed the options are not separated by if "listbox" display is not checked... is this possibly something that may be added eventually?

Comments

SchwebDesign’s picture

EDIT:

the example options above should've shown as such:

<Security>
0|CCTV
1|Access Control
2|Bus Video Surveillance
3|Mobile Asset Tracking
4|Other: Specify Below
<Communications>
5|Portable Two-Way
6|Mobile Two-Way
7|Repeaters/Fixed Equip
8|Used Equipment
9|Accessories
10|Other: Specify Below
<Specialty>
11|GPS Fleet Management
12|Wireless Clocks
13|Other: Specify Below
<Services>
14|FCC Licensing
15|Maintenance and Service Requests
16|Tower Leasing
17|Other: Specify Below
quicksketch’s picture

Just to clarify also, the last sentence of your post was:

Additionally, I noticed the options are not separated by <group name> if "listbox" display is not checked... is this possibly something that may be added eventually?

This probably won't be added, since select lists are just imitating the capabilities of HTML, since they natively support the optgroup HTML tag. Radio buttons and checkboxes don't support such tags, though it would be possible if Webform did its own theming of radios and checkboxes instead of using the Drupal default.

Anyway, that should be a separate feature request if you want to pursue it further, but I don't think it's likely to happen. I'll look into your original request and see if I can reproduce the problem with select lists not showing up in the e-mail. I think I have a good idea of why that might happen. Thanks for the excellent report.

quicksketch’s picture

StatusFileSize
new8.42 KB

Looks like we have all kinds of problems with select lists and groups right now. There were quite a few situations regarding optgroups that I didn't account for in #406486: Allow pluggable select list values. The root of our problems originated in doing checks like <?php if (isset($options[$value])) { ?>. The problem being that $value would never be found if using optgroups, since the array is structured more like $options[$group_name][$value].

So this patch restores a previous ability we had where we can simply request the list to be "flat" and get back a list without the groups in place. This makes it so that our value check works again. As I said though, there are quite a few places where this is a problem besides e-mail: table results, analysis, CVS downloads, etc. So this patch is a bit bigger than it would be for just fixing the e-mail problem.

roball’s picture

Excellent quicksketch - the #3 patch fixes all my result views (xls downloads) on select field types. However, grid field types results views are still broken since beta3. Should I file a separate bug report on this?

quicksketch’s picture

Title: listbox select options group prevents output to emails within %email_values » Select and grid components show key (or nothing) instead of values in emails, CSV, table, etc.
Status: Active » Needs work

We can fix it here. Thanks for testing roball!

quicksketch’s picture

Status: Needs work » Needs review
StatusFileSize
new11.04 KB

This should fix the display of both selects and grids in emails, table display, analysis, and csv downloads.

roball’s picture

Status: Needs review » Fixed

Yeah, the #6 patch fixes all problems with both select and grid fields :-) Should be committed ASAP, IMO.
Thanks!

quicksketch’s picture

Thanks again roball. Committed.

roball’s picture

Nice - Webform 6.x-3.x-dev (2010-Apr-08) is working fine again (after beta 3 and 4 was broken somehow). Maybe beta 5 should be released soon, to have a version being at least as stable as beta 2?

Status: Fixed » Closed (fixed)

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