According to the checkboxes documentation the options array should be in the format of [return_value] = choice, but the expand check boxes was not properly setting the return_value option. Patch is attached to correct this.

Comments

pfaocle’s picture

Version: » x.y.z

Could this one get reviewed by some Forms API peeps? I have a sneaking suspicion that a bug in the implementation of checkboxes is causing all manner of problems and bugs in many different parts of Drupal... most notably, theme settings.

(I would have a look myself, but I'm afraid I'm quite pissed.)

eaton’s picture

I've been experiencing some problems with a patch to menu.module that might be related to this as well -- if a return value and a default value are specified for a checkbox, it seems to ALWAYS return the default value even if the checkbox is unchecked. Odd stuff.

Steve Dondley’s picture

checkboxes code has been give a throrough overhaul by chx. this bug is dead.

eaton’s picture

Status: Needs review » Fixed

Agreed.

Steve Dondley’s picture

StatusFileSize
new824 bytes

Oops, not really. Just talked to chx in IRC. He said to reroll. Here it is.

Steve Dondley’s picture

Status: Fixed » Needs review
Steve Dondley’s picture

StatusFileSize
new866 bytes

same patch with the -p option applied during the diff per chx's recommendation.

dries’s picture

Status: Needs review » Fixed

Committed to HEAD. Thanks.

ccourtne’s picture

Status: Fixed » Closed (fixed)