Page 1 of 1

User confirmation before save data after cohereny check

Posted: Tue May 31, 2022 2:34 pm
by damien
Hello,

I would like to perform some coherency check before saving a form.
I code some control in Javascript into the nuBeforeSave function of the edit.
If I found errors it returns false and display the reason in nuMessage().
I works fine.

But in my use case I would like to allow the user to save an incoherent form if he wants.
I would like to warn the user that there is an non coherency but let him chose to save or to correct.

I have add a checkbox into the form (not linked to the database) that the user can check to force saving.

Is it the best solution ?
I do not found some "message box" function to ask the user.

Thanks,
Damien

Re: User confirmation before save data after cohereny check

Posted: Tue May 31, 2022 2:41 pm
by kev1n
Hi,

Use the confirm() function.

Re: User confirmation before save data after cohereny check

Posted: Tue May 31, 2022 3:33 pm
by damien
Waw, Excellent so easy !
Thanks :hi: