You can easily remove any form field from a document using
instance.delete(). This call will also remove the associated widget annotations.
The following example finds and deletes a form field and its associated widget annotation:
const formFields = await instance.getFormFields(); const formField = formFields.find( (formField) => formField.name === 'my form field', ); await instance.delete(formField);