Download & Extend

Form API checkboxes type does not honor return value in options array

Project:Drupal core
Version:x.y.z
Component:base system
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
checkboxes_2.patch815 bytesIgnored: Check issue status.NoneNone

Comments

#1

Version:<none>» 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.)

#2

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.

#3

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

#4

Status:needs review» fixed

Agreed.

#5

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

AttachmentSizeStatusTest resultOperations
checkboxes_reroll.patch824 bytesIgnored: Check issue status.NoneNone

#6

Status:fixed» needs review

#7

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

AttachmentSizeStatusTest resultOperations
checkboxes_reroll_0.patch866 bytesIgnored: Check issue status.NoneNone

#8

Status:needs review» fixed

Committed to HEAD. Thanks.

#9

Status:fixed» closed (fixed)