function getElementName($index)
    {
        $this->_createElementsIfNotExist();
        $elementName = false;
        if (is_int($index) && isset($this->_elements[$index])) {
            $elementName = $this->_elements[$index]->getName();
            if (isset($elementName) && $elementName == '') {
                $elementName = $index;
            }
            if ($this->_appendName) {
                if (is_null($elementName)) {
                    $elementName = $this->getName();
                } else {
                    $elementName = $this->getName().'['.$elementName.']';
                }
            }

        } elseif (is_string($index)) {
            foreach (array_keys($this->_elements) as $key) {
                $elementName = $this->_elements[$key]->getName();
                if ($index == $elementName) {
                    if ($this->_appendName) {
                        $elementName = $this->getName().'['.$elementName.']';
                    }
                    break;
                } elseif ($this->_appendName && $this->getName().'['.$elementName.']' == $index) {
                    break;
                }
            }
        }
        return $elementName;
    }
function getElementName($index)
    {
        $this->_createElementsIfNotExist();
        $elementName = false;
        if (is_int($index) && isset($this->_elements[$index])) {
            $elementName = $this->_elements[$index]->getName();
            if (isset($elementName) && $elementName == '') {
                $elementName = $index;
            }
            if ($this->_appendName) {
                if (is_null($elementName)) {
                    $elementName = $this->getName();
                } else {
                    $elementName = $this->getName().'['.$elementName.']';
                }
            }

        } elseif (is_string($index)) {
            foreach (array_keys($this->_elements) as $key) {
                $elementName = $this->_elements[$key]->getName();
                if ($index == $elementName) {
                    if ($this->_appendName) {
                        $elementName = $this->getName().'['.$elementName.']';
                    }
                    break;
                } elseif ($this->_appendName && $this->getName().'['.$elementName.']' == $index) {
                    break;
                }
            }
        }
        return $elementName;
    }
function getElementName ( $ index ) { $ this -> _createElementsIfNotExist ( ) ; $ elementName = false ; if ( is_int ( $ index ) && isset ( $ this -> _elements [ $ index ] ) ) { $ elementName = $ this -> _elements [ $ index ] -> getName ( ) ; if ( isset ( $ elementName ) && $ elementName == '' ) { $ elementName = $ index ; } if ( $ this -> _appendName ) { if ( is_null ( $ elementName ) ) { $ elementName = $ this -> getName ( ) ; } else { $ elementName = $ this -> getName ( ) . '[' . $ elementName . ']' ; } } } elseif ( is_string ( $ index ) ) { foreach ( array_keys ( $ this -> _elements ) as $ key ) { $ elementName = $ this -> _elements [ $ key ] -> getName ( ) ; if ( $ index == $ elementName ) { if ( $ this -> _appendName ) { $ elementName = $ this -> getName ( ) . '[' . $ elementName . ']' ; } break ; } elseif ( $ this -> _appendName && $ this -> getName ( ) . '[' . $ elementName . ']' == $ index ) { break ; } } } return $ elementName ; }
Returns the element name inside the group such as found in the html form

@param     mixed     $index  Element name or element index in the group
@since     3.0
@access    public
@return    mixed     string with element name, false if not found
Returns the element name inside the group such as found in the html form