public function removeFieldById($id)
    {
        foreach ($this->fields as $i => $field) {
            if ($field->getId() == $id) {
                unset($this->fields[$i]);
                break;
            }
        }

        return $this;
    }
public function removeFieldById($id)
    {
        foreach ($this->fields as $i => $field) {
            if ($field->getId() == $id) {
                unset($this->fields[$i]);
                break;
            }
        }

        return $this;
    }
public function removeFieldById ( $ id ) { foreach ( $ this -> fields as $ i => $ field ) { if ( $ field -> getId ( ) == $ id ) { unset ( $ this -> fields [ $ i ] ) ; break ; } } return $ this ; }
Remove a field from the form by the name of the field

@param $id
@return Form
Remove a field from the form by the name of the field