Your listener id (must be unique)
Your listener function
// log a message in the console once a sub form dialog has been opened
JMap.Event.Form.on.subFormDialogOpened(
"custom-sub-form-dialog-opened",
params => console.info(`Sub form dialog opened for layer id="${params.layerId}"`, params.subForm)
)
JMap.Event.Form.on.subFormDialogOpened
This event is triggered each time a sub form dialog is opened.