public function addElement($element, $name = null, $options = null)
    {
        parent::addElement($element, $name, $options);

        if ($this->isAutoSubmit()) {
            if (null !== $name) {
                $element = $this->getElement($name);
            }
            $this->_enableAutoSubmitElement($element);
        }

        return $this;
    }
public function addElement($element, $name = null, $options = null)
    {
        parent::addElement($element, $name, $options);

        if ($this->isAutoSubmit()) {
            if (null !== $name) {
                $element = $this->getElement($name);
            }
            $this->_enableAutoSubmitElement($element);
        }

        return $this;
    }
public function addElement ( $ element , $ name = null , $ options = null ) { parent :: addElement ( $ element , $ name , $ options ) ; if ( $ this -> isAutoSubmit ( ) ) { if ( null !== $ name ) { $ element = $ this -> getElement ( $ name ) ; } $ this -> _enableAutoSubmitElement ( $ element ) ; } return $ this ; }
Add a new element

$element may be either a string element type, or an object of type
\Zend_Form_Element. If a string element type is provided, $name must be
provided, and $options may be optionally provided for configuring the
element.

If a \Zend_Form_Element is provided, $name may be optionally provided,
and any provided $options will be ignored.

@param  string|\Zend_Form_Element $element
@param  string $name
@param  array|\Zend_Config $options
@throws \Zend_Form_Exception on invalid element
@return \Zend_Form (continuation pattern)
Add a new element