THotPDF.ResetLoadedFormField Method
Restores the current value of a specified field in the loaded PDF form to the field's default value
Declaration
procedure ResetLoadedFormField(FieldIndex: Integer);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | Zero-based index of the form field to be reset |
Usage notes
- 重置后字段的当前值将被覆盖为 DV(DefaultValue)条目的值;若字段未设置 DV,则重置为空值
- When batch-resetting multiple fields, it is recommended to call this method one by one rather than relying on the PDF viewer's global reset action, allowing for precise control of scope
- 重置操作不可撤销,执行前可先用
GetLoadedFormFieldValue记录当前值以备恢复