Active
Project:
Better Select
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2010 at 16:01 UTC
Updated:
10 Sep 2013 at 17:29 UTC
I was just wondering the reasoning behind the following code:
foreach($element['#options'] as $key => $val) {
if (!is_numeric($key) || !is_string($val)) {
return $element;
}
}This stops 2 of my multiselects from being transformed as the keys are strings. I have commented out the "return $element" line and it seems to work ok, was this implemented for a reason?
Comments
Comment #1
agileware commentedThis does seem strange.
Is there some technical limitation?
It would be much more useful if text type select fields could also use this module.
Working for integer fields only greatly reduces the usefulness of this module.
Comment #2
john franklin commentedThe code that denies non-numeric keyed forms was in response to #362746: Check that #options are valid, else abort conversion to checkboxes. It looks like it was applied broadly to fix a critical incompatibility with the intention of refining the patch later.
For those interested, the commit in question is d063a1fc.