ExecuteFormFieldScriptEvent
Forms, JavaScript safety
Description
Executes a field /K, /F, /V or /C action in the bounded local form-script runtime and returns the resulting event state
Syntax
Function TPDFlib.ExecuteFormFieldScriptEvent(Index: Integer; Action: TPDFlibFormScriptAction; Const InputEvent: TPDFlibFormScriptEvent; Out OutputEvent: TPDFlibFormScriptEvent): Integer;
Parameters
| Index | The one-based target field index |
|---|---|
| Action | The field event to execute |
| InputEvent | The initial value, change, source field, selection, key state and commit state |
| OutputEvent | The final event state, including writable value, change, rc, selStart and selEnd properties |
Return values
Returns 1 when execution succeeds and event.rc remains true, or 0 when the action is absent, rejects the event, is unsupported, is invalid or exceeds a resource limit
Remarks
The controlled object surface exposes standard field-event properties, read-only event.target and event.source field properties, this.numFields, this.getField(...) and this.getNthFieldName(...)
name and type field properties, value, valueAsString and readonly
Field objects expose required, charLimit,
Push buttons, check boxes and radio buttons reject /K, /F, /V and /C execution, and only a successful calculation writes the final value to the stored field
The runtime has no file, network, process, UI, dynamic-code or unrestricted document-object capability
See also
TPDFlibFormScriptEvent, SetFormScriptLimits, GetFormScriptDiagnostics, ExecuteFormFieldScript