Skip to main content

Hi All,

 

is it possible to display a message on form redirection.

 

Eg: when filing a form and if navigating away from the form accidently by click on a link in the form, we should pop up a message like 'Are you sure? you will lose your data'

 

We are using K2 forms in K2 Five for SharePoint app.

 

 

Thanks!

Hi Sajna_M


 


You should be able to do this with a JavaScript.


 


Add a Data Label to the Form


Change it to Visible - No, Literal - Yes


Add the following code to the Data Label Text: 


<script> window.onbeforeunload = function(e) {return 'Are you sure? You will lose your data.';};</script>

This should give you a warning when closing/navigating away from the Form.


 


Cheers,


T


Reply