Your listener id (must be unique)
Your listener function
// log a message in the console once a form layer dialog has been closed
JMap.Event.Form.on.layerDialogClosed(
"custom-form-layer-dialog-closed",
params => console.info(`Layer form dialog closed for layer id="${params.layerId}"`)
)
JMap.Event.Form.on.layerDialogClosed
This event is triggered each time a layer form dialog is closed (attribute and external forms).