SetFormFieldJavaScriptEvent
Form fields
Description
Assigns JavaScript to a form field event selected by numeric event ID
Syntax
Delphi
Function TPDFlib.SetFormFieldJavaScriptEvent(Index, EventID: Integer; Const JavaScript: WideString): Integer;
Parameters
| Index | Form field index |
|---|---|
| EventID | 0 U, 1 D, 2 E, 3 X, 4 Fo, 5 Bl, 6 K, 7 F, 8 V, 9 C |
| JavaScript | Script body to attach |
Return values
Returns 1 on success, or 0 for an invalid field, event ID, empty script, or PDF/A mode
Remarks
Use this wrapper when the Delphi class API is preferred over assembling the lower-level PDF objects manually