THotPDF.SetFormFieldAdditionalAction Method
Installs an AcroForm field additional action from a THPDFActionBuilder under the field widget /AA dictionary
Declaration
procedure SetFormFieldAdditionalAction(const FieldName: AnsiString; Trigger: THPDFFormFieldActionTrigger; Action: THPDFActionBuilder);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldName | Existing AcroForm field name to find in the generated field list |
Trigger | Field additional-action trigger: KeyStroke, Format, Validate, or Calculate |
Action | Action chain built with THPDFActionBuilder |
Usage notes
- Call this method after creating the target field and before
EndDoc - The method replaces any existing action for the same trigger key and keeps other
/AAentries unchanged - Use
ClearFormFieldAdditionalActionto remove one field trigger entry without disturbing other field actions - Use the named helpers in
THotPDFFormFieldActionConvenienceMethodswhen code should call one method per field or widget trigger - Builder validation enforces PDF/A and PDF/X restrictions for action types that are not allowed in those conformance families
- Use
AttachFieldKeyStrokeAction,AttachFieldFormatAction,AttachFieldValidateAction, orAttachFieldCalculateActionfor the JavaScript-only convenience path