SetFormFieldActionEx
Form fields, Annotations and hotspot links
Description
Builds and assigns a form-field trigger action by using an event name and a named action builder constant
Syntax
Delphi
Function TPDFlib.SetFormFieldActionEx(Index: Integer; Const EventName: WideString; ActionKind: Integer; Const Value, FieldNames: WideString; Flags, DestID: Integer): Integer;
Parameters
| Index | The 1-based form-field index |
|---|---|
| EventName | The trigger event name, such as MouseUp, MouseDown, MouseEnter, MouseExit, Focus, LostFocus, KeyPress, BeforeFormatting, Change, or Calculate |
| ActionKind | One of the PDF_ACTION_BUILDER_* constants supported by AddActionNextEx |
| Value | The URI, named action, JavaScript source, import-data file name, or unused value for destination actions |
| FieldNames | A comma-separated field list for hide, submit, and reset actions |
| Flags | Action-specific submit or reset flags, or the hide flag for visibility actions |
| DestID | The destination handle for PDF_ACTION_BUILDER_DESTINATION |
Return values
| 0 | The field, event name, action kind, or required value was invalid |
|---|---|
| 1 | The action was built and assigned to the selected field event |
Remarks
This helper combines event-name resolution with action construction, which avoids separate temporary action handles when a field event only needs a direct URI, JavaScript, hide, submit, reset, import-data, named, or destination action