THotPDF.ResetLoadedFormField Method
Restores a loaded text, choice, checkbox or radio field from its effective default value whilst preserving sibling fields and ancestor defaults
Declaration
procedure ResetLoadedFormField(FieldIndex: Integer);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldIndex | Zero-based index of the loaded terminal field |
Return value
This member returns no value
Usage notes
- Reads the nearest
/DVentry along 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, synchronises button appearance states and marks the field as dirty
- When no default exists, it 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 behaviour described here covers text, choice, checkbox and radio fields; pushbuttons and other field types keep their existing behaviour
- Invalid default types are rejected before the field value or selection indices change