Normally they won't loose any data, because in their browser they still have all the data in the form
What you can do on the server side is ensure that when they try to submit that data after their session has run out, that that data gets accepted after login. So they get asked for username and password again and if that is correct either the server has remembered the form data and submits it automatically or they get forwarded to the page they had been with the form data they had at that time filled in. Then they just have to klick the submit button again
| [reply] |
You still have a fundamental limitation of the form data that's in the browser and not submitted not being present on the server. If it's a multi-part form that has had data previously submitted, you can save the already submitted data. If the browser is closed without submitting part of the data, there is no way for the server to get that portion of the data at all. | [reply] |
I think as I sit here and ponder, I will attempt to use Ajax to call a controller method that will write the data to the database, then return the primary key and hide it in the form. This way when the users return to complete the form, instead of writing a new record, it will use the primary key to update the existing record. And if the application has logged the user out, then when the user returns to the form, the application will check to see if a record already exists. If yes, it will retrieve the partially saved data, otherwise, the form will have blank fields.
This has been a great exercise in thought. Thanks for your help!
| [reply] |