public function removeAllFieldsByName($name)
    {
        foreach ($this->fields as $i => $field) {
            if ($field->getName() == $name) {
                unset($this->fields[$i]);
            }
        }

        return $this;
    }
public function removeAllFieldsByName($name)
    {
        foreach ($this->fields as $i => $field) {
            if ($field->getName() == $name) {
                unset($this->fields[$i]);
            }
        }

        return $this;
    }
public function removeAllFieldsByName ( $ name ) { foreach ( $ this -> fields as $ i => $ field ) { if ( $ field -> getName ( ) == $ name ) { unset ( $ this -> fields [ $ i ] ) ; } } return $ this ; }
Remove all fields by the given name.
If there are more then 1 field with the given name, then all will be removed.

@param $name
@return Form
Remove all fields by the given name . If there are more then 1 field with the given name then all will be removed .