Warning message on cancel button?


Is it possible to show a warning message when I click on Cancel Button ? When I add a new form, if I decide to fill fields, but cancel, I lose everything.


Sorry I don’t have time to give you a full answer, but basically you need to create your own Cancel Button that will show your warning message and then decide if you stay in the page or do an sc_redir to cancel your data

Have you tried to set at TRUE the flag Notify discarded changes in the Layout and Behavior section of the form settings.
If active should show a warning fi you try to leave the form without saving, I don’t remember if the warning is valid if the user click CANCEL.
Otherwise jlboutin60 suggestion is valid, a custom CANCEL button.

Ok thank you very much guys !

I’m not a expert with Jquery but this is my solution :

If textfield (tinyMCE) is not empty, I show a warning message (in french).

It’s possible to show a sweet alert in this context ?