THotPDF.ResetLoadedFormField Method
Restores a loaded text, choice, checkbox, or radio field from its effective default value while preserving sibling fields and ancestor defaults
Declaration
procedure ResetLoadedFormField(FieldIndex: Integer);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | Zero-based loaded terminal-field index |
Return value
This member does not return a value
Usage notes
- Reads the nearest
/DVentry through the parent chain and resolves indirect defaults - Copies supported string, name, and choice-array defaults into a local
/Vvalue without sharing mutable default data - Rebuilds choice selection indices, synchronizes button appearance states, and records the field as dirty
- When no default exists, writes an empty local value for text and choice fields or
/Offfor buttons, so clearing one child does not expose an ancestor's current value - Call EnsureLoadedFieldAppearanceStream when a text or choice field needs a regenerated visible appearance before saving
- An invalid field index leaves the document unchanged
- The typed-default behavior described here covers text, choice, checkbox, and radio fields; pushbuttons and other field types retain their existing behavior
- Invalid default types are rejected before changing the field value or selection indices