function GetWidgetAdditionalActionJavaScript(AnnotIndex: Integer; EventType: Integer): WString;
| AnnotIndex | Integer. Zero-based index of the widget annotation on the current page. |
| EventType | Integer. Which additional action to read, one of the FPDF_ANNOT_AACTION_* values: FPDF_ANNOT_AACTION_KEY_STROKE (12), FPDF_ANNOT_AACTION_FORMAT (13), FPDF_ANNOT_AACTION_VALIDATE (14), FPDF_ANNOT_AACTION_CALCULATE (15). |
| Result | WString. The script source, or an empty string when the widget has no such action. |
Form fields can carry per-event scripts (ISO 32000-1 12.6.3): a keystroke filter, a format routine that rewrites what the field displays, a validation routine, and a calculation that derives one field from others. This reads the source of one of them
It is a read-only view intended for auditing and migration - the script is returned as text, not executed. Document-level scripts are listed by JavaScriptActions instead
An empty result also covers the case where the form layer is not active or the PDFium build lacks the entry point, so a caller who needs the distinction should check FormHandle first