Confirm Before Save

Good Evening,

I have a requirement on a form to confirm a message prior to submit, I have looked at the documentation and added the following: -

    //change click function
    fd.toolbar.buttons[0].click = function(){
        if (confirm('Are you sure you want to submit the form?')) {
            fd.save();
        }
    }

This does the job however I would like my confirm message to come after the validation not before, I have tried to add a confirm into the fd.spBeforeSave event with a return false; if not confirmed, but it doesn’t work.

Is there a way I can do this, or even manually trigger the validation check, as I could do this and only if it comes back clear then trigger my confirm, and then trigger the fd.save()

Thanks

Dear Tony,

You can try check fd.isValid property: https://plumsail.com/docs/forms/javascript/manager.html