Hi.

For me, isChecked method works only after I set my buttons (type="submit")
have same value for label and value attribs.
Also, it returns opposite value then expected, false when button is clicked!

Lets take a look at buton/submit isChecked method:

/**
 * Has this submit button been selected?
 *
 * @return bool
 */
public function isChecked()
{
        $value = $this->getValue();

        if (empty($value)) {
                return false;
        }
        if ($value != $this->getLabel()) {
                return false;
        }

        return true;
}

pretty odd, huh? I don't know why it is implemented this way, but I patched
it to return opposite value, and it works now. Why label and value need to
have same value at all?

Anyone with same behaviour?
-- 
View this message in context: 
http://n4.nabble.com/Buttons-and-isChecked-method-tp976255p976255.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to