The description of the onScreenSubmitted system event is
“Event that fires before a screen is submitted, to allow widgets to prompt for unsaved changes, etc.”
But I cannot find any information as to how I can actually halt submission from within it. It’s not too useful to be able to notify the user that they have unsaved changes if you can’t prevent the discarding of the changes from going through.
In order to cancel the submission of the screen you’ll need to have a custom action widget which simply returns “false” to the execution state:
Then in the screen you should be able to use your action widget somewhat like that (I called action widget “cancel-event”):