src/Framework/Form/Fieldset.php
public function insertFieldAfter($name, Element\AbstractElement $field)
    {
        foreach ($this->fields as $i => $group) {
            $fields = [];
            foreach ($group as $key => $value) {
                if ($key == $name) {
                    $fields[$key] = $value;
                    $fields[$field->getName()] = $field;
                } else {
                    $fields[$key] = $value;
                }
            }
            $this->fields[$i] = $fields;
        }
        return $this;
    }
public function insertFieldAfter($name, Element\AbstractElement $field)
    {
        foreach ($this->fields as $i => $group) {
            $fields = [];
            foreach ($group as $key => $value) {
                if ($key == $name) {
                    $fields[$key] = $value;
                    $fields[$field->getName()] = $field;
                } else {
                    $fields[$key] = $value;
                }
            }
            $this->fields[$i] = $fields;
        }
        return $this;
    }
public function insertFieldAfter ( $ name , Element \ AbstractElement $ field ) { foreach ( $ this -> fields as $ i => $ group ) { $ fields = [ ] ; foreach ( $ group as $ key => $ value ) { if ( $ key == $ name ) { $ fields [ $ key ] = $ value ; $ fields [ $ field -> getName ( ) ] = $ field ; } else { $ fields [ $ key ] = $ value ; } } $ this -> fields [ $ i ] = $ fields ; } return $ this ; }
Method to insert a field after another one

@param  string                  $name
@param  Element\AbstractElement $field
@return Fieldset
Method to insert a field after another one