/** * remove a field * * @param FOFForm $form A form object * @param mixed $fields Array of fieldnames or a fieldname * * @return void */ private function removeFields($form, $fields) { $fields = (array) $fields; foreach ($fields as $fieldname) { $form->removeField($fieldname); } }