Hi,
I just stepped over a bug in the select component.
If the option text of a select component contains special chars (in this case an &), the value is not submitted and not mailed correctly.
The reason therefore is different creation methods for the select options while rendering and submitting the form.
function _webform_render_select() fetches the values from the modules configuration and creates the form component names with _webform_safe_name().
function _webform_submit_select() pipes the submitted values through _webform_filtervalues(), which has an impact und html special chars.
To recreate this error, create a webform with a select component.
Use something like
red & green blue & yellow black & white
as options text.
Fill and submit the form, the select values won't be submitted.
The form elements option name will be something like red__green.
When the form is submitted, the module looks for the field key red_amp_green.
Simple workaround is to modify _webform_render_select() at about line 96 to:
...
}
else {
$options[_webform_safe_name(_webform_filtervalues($row))] = $row;
}
Comments
Comment #1
quicksketchThanks, the select module has a long history of screwy form handling. Please post if this workaround causes new issue for you.
Comment #2
quicksketchThanks, I included the fix for this in this issue: #264709: 'select' with non-latin values
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.