widgetIndex

Where widget is in PdfFormField.widgets, which a script handler takes to run that widget's scripts.