Confirm dialog complete button

I put a confirm alert on the complete button of a form, so as not to let it complete the task if I wish, but even clicking the cancel button of confirm it completes the task, what should I do?

to call confirm dialog i use this script

	camForm.on ('submit',function () {
		confirm("texte here");
	})

Hi @MarceloCP,

Try below code

camForm.on ('submit',function (evt) {
	var r = confirm("texte here");
	if (!r) {
		evt.submitPrevented = true;
	} 
})
1 Like

wonder worked right

thank you very much