You can keep the field set to single choice, and use hook_webform_submission_render_alter()
to display the values as if it was still a multi-select field.
You can use the hook in a module or the template.php
of a theme. If you are thinking about implementing it in a theme, keep in mind that the Webform Results
view is displayed through the Administration theme. So, the hook must be implemented in the default administration theme for it to work in that view. By implementing it in a module, you shouldn't have to worry about which theme the submission results are being shown.
You will need the nid
for the webform, and the form Key
for the select field. The nid is in the url of the webform's edit page. The form key
can be seen in the webform's Form components
page.
The following code is implemented in the "my_module" module, for a webform with a nid
of "100", and a field with the form key
"my_select_field".
/**
* Implements hook_webform_submission_render_alter().
*/
function my_module_webform_submission_render_alter(&$renderable) {
if ($renderable['#node']->nid == '100' && isset($renderable['my_select_field'])) {
$renderable['my_select_field']['#multiple'] = 1;
}
}
The isset($renderable['my_select_field'])
in the if statement may seem redundant, but it's there to prevent an exception if someone changes the form key
for the field.