function setValues($values)
    {
        if (empty($values)) {
            // give it default checkbox behavior
            $this->_values = array('', 1);
        } elseif (is_scalar($values)) {
            // if it's string, then assume the value to
            // be passed is for when the element is checked
            $this->_values = array('', $values);
        } else {
            $this->_values = $values;
        }
        $this->updateAttributes(array('value' => $this->_values[1]));
        $this->setChecked($this->_currentValue == $this->_values[1]);
    }
function setValues($values)
    {
        if (empty($values)) {
            // give it default checkbox behavior
            $this->_values = array('', 1);
        } elseif (is_scalar($values)) {
            // if it's string, then assume the value to
            // be passed is for when the element is checked
            $this->_values = array('', $values);
        } else {
            $this->_values = $values;
        }
        $this->updateAttributes(array('value' => $this->_values[1]));
        $this->setChecked($this->_currentValue == $this->_values[1]);
    }
function setValues ( $ values ) { if ( empty ( $ values ) ) { // give it default checkbox behavior $ this -> _values = array ( '' , 1 ) ; } elseif ( is_scalar ( $ values ) ) { // if it's string, then assume the value to // be passed is for when the element is checked $ this -> _values = array ( '' , $ values ) ; } else { $ this -> _values = $ values ; } $ this -> updateAttributes ( array ( 'value' => $ this -> _values [ 1 ] ) ) ; $ this -> setChecked ( $ this -> _currentValue == $ this -> _values [ 1 ] ) ; }
Sets the values used by the hidden element

@param   mixed   $values The values, either a string or an array

@access public
@return void
Sets the values used by the hidden element