THotPDF.RemoveFormField Method
Removes a terminal form field and its widget annotations from a loaded document
Declaration
procedure RemoveFormField(FieldIndex: Integer);
procedure RemoveFormField(const FieldName: AnsiString);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | Zero-based terminal-field index returned by the field enumeration helpers |
FieldName | Qualified field name, including parent components such as group.a |
Return value
This member does not return a value
Usage notes
- Both overloads raise an exception when the target does not exist
- Deleting a named child preserves sibling fields even when their type and options are inherited from a shared parent
- Widget entries are removed from page annotation arrays, and empty ancestors are pruned from the field tree
- Removal invalidates the relationship cache; enumerate fields again before using indices for a subsequent operation