Normal users are not like us. We know that if we leave a page before submitting a form, the data we have added will be lost. Normal users might be happily filling in a web form, get half way through, get distracted and then click on a link and lose their data. Ok, maybe they are exactly like us, because I have done this as well. We are all busy. We all get distracted.

A helpful reminder is in order - a simple popup with a warning, alerting the user to the fact that if they leave the current page, they will lose the data on the form.

You could write some Javascript to do this. There is a bunch of tutorials and stackoverflow posts about this. Or, if you are using Drupal, you could just download and enable Node Edit Protection, which will do it all out of the box.

Node Edit Protection will display a Javascript dialog with two options - stay on the page or leave and lose the data. If you click “Stay on the this page”, you can carry on filling in the form, no harm done. If you click “Leave this Page”, you will lose your data, but at least you have been warned.

Confirm navigation

Check out Node Edit Protection