public function getElementById($id)
    {
        foreach ($this->getRecursiveIterator() as $element) {
            if ($id == $element->getId()) {
                return $element;
            }
        }
        return null;
    }
public function getElementById($id)
    {
        foreach ($this->getRecursiveIterator() as $element) {
            if ($id == $element->getId()) {
                return $element;
            }
        }
        return null;
    }
public function getElementById ( $ id ) { foreach ( $ this -> getRecursiveIterator ( ) as $ element ) { if ( $ id == $ element -> getId ( ) ) { return $ element ; } } return null ; }
Returns an element if its id is found

@param    string  Element id to find
@return   HTML_QuickForm2_Node|null
Returns an element if its id is found