$fields = new FieldList( TextField::create('Name'), TextField::create('Email'), TextareaField::create('Message') ); $fields->removeByName('Email');
$myFields = MyCustomForm::getCMSFields(); $myFields->removeByName('SomeField');In this example, we assume that `MyCustomForm` is a class that extends `FormField`. We use the `getCMSFields` function to get a list of fields for the form, and then remove a field named `SomeField`. It's not clear what package/library the `FieldList` class comes from without further context, as there are many different PHP packages and libraries that could potentially include this class.