THotPDF.SetLoadedFormFieldValueByName Method
Sets the current value of an AcroForm form field in the loaded PDF document by field name, suitable when the field name is known
Declaration
procedure SetLoadedFormFieldValueByName(const AFieldName, AValue: AnsiString);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
AFieldName | The complete field name of the target form field (T or hierarchical full name), case-sensitive |
AValue | The new value string to write to the V entry of this field |
Usage notes
- 字段名匹配区分大小写,若名称不存在则静默返回,不抛出异常
- Compared to operating by index, operating by name is more readable and is recommended in scripted form-filling scenarios
- Changes must be saved before they can become persistent