So we have a checkbox created in a view script with $this->formCheckbox(). There is a javascript that is called when the form is submitted to verify that the checkbox is checked but in IE the script always sees the form as unchecked, even when it is checked. This is the case when using document.getElementById() and prototypes $F(). It appears that the reason for this is that formCheckbox() adds a hidden field in front of the checkbox field. The hidden field has the same name as the checkbox but no ID but this doesn't stop IE from seeing the hidden field rather than the checkbox even when searching by ID. So obviously IE is being its normal stupid self by grabbing an element by name even when you tell it to get the element by id.
My question is, why does formCheckbox() put a hidden field before the checkbox? The documentation does provide an explanation but I don't believe it is a good one. In my mind if I want a checkbox I should use formCheckbox() and if I decide to put a hidden field in front of the checkbox I should do so with formHidden(). I should not have to work around my framework adding form fields that I didn't ask for, especially when it creates browser compatability issues. Mark -- Have fun or die trying - but try not to actually die.
