26 Dec
2005
26 Dec
'05
3:58 a.m.
Karoly Negyesi wrote:
Either we change #default_value structure or we change #value.
a) We could make #default_value an array of
something_that_has_the_information => 1
pairs. This would make it more complicated to build #default_value and it's looking strange.
b) we change #value instead to be a list of selected values, like in multiselect. The code change in form.inc for this is minimal:
if ($form['type'] == 'checkboxes') { $edit = array_keys(array_filter($edit)); }
I think (b) is uglier and less efficient than (a). (a) also makes more logical sense to my way of thinking. I don't find it strange looking; it actually rather resembles how HTML works. My 2 cents. ..chrisxj