Sometimes users can be frustrated when using popup pages because they find that the popup closes if they accidentally click off the view. The following couple of lines of code can change this behaviour (as well as, optionally, removing the 'X' button on the popup):
//this code remove the close button and prevents clicking off a popup window
$(document).on('knack-scene-render.scene_XX', function(event, scene) {
$("button.close-modal").remove();
$('.kn-modal-bg').off('click');
});
With the popup set in this way, the user would be forced to use the submit button to close and therefore have to complete the operation.
Thank you. Didn't work here, though