I'm having problems with Zend_Form_Element_Image::isChecked() across
browsers. I created a form where the only elements were images. When
the user clicks one, that item should be removed from the list. When I
test the form in Firefox, Chrome, and Safari (Windows) it works just
fine. When I test using Internet Explorer 7and Opera, the list remains
unchanged.
I looked at the post data submitted by FF (using Live HTTP Headers)
and IE (using ieHTTPHeaders) and this is what I see:
FF:
removeGuest%5B5%5D.x=8&removeGuest%5B5%5D.y=9&removeGuest%5B5%5D=Barney+Fife
IE:
removeGuest%5B5%5D.x=6&removeGuest%5B5%5D.y=10
The values I see in both $_POST and $request->getPost() are:
FF:
array(1) {
["removeGuest"] => array(1) {
[5] => string(11) "Barney Fife"
}
}
IE:
array(1) {
["removeGuest"] => array(1) {
[5] => string(2) "10"
}
}
I know this is essentially a browser issue, and I'm guessing that the
"fix" will be for the isChecked() method to be changed from this:
public function isChecked()
{
$imageValue = $this->getImageValue();
return ((null !== $imageValue) && ($this->getValue() == $imageValue));
}
to this:
public function isChecked()
{
return ($this->getValue() != null);
}
For now, though, is there a workaround I can use?
Andrew