Autosaving forms reliably - timer?

Soldato
Joined
16 Nov 2003
Posts
9,682
Location
On the pale blue dot
I'm currently building a PHP powered web form. The user is required to enter quite a fair amount of data so they need some sort of office style autosave while they work which would dump their info into SQL in case the browser crashes or they close it or whatever.

I was thinking of using a javascript timer, but from other non-web projects in the past I've always been told to avoid timers, as they are often not reliable. Now I don't need to measure down the millisecond but do you reckon that a javascript timer would be okay to say, save after ten minutes on the form?

If not, what else would you suggest?
 
toastyman said:
Why not break down the one form into several different pages, and save the user's data to a php session after they have completed each page?

If it is a large form, it would probably be best to break it down into smaller chunks, so this would be an ideal solution :)

Good idea in theory but I can't. The majoriy of the form time will be devoted to a text box that needs a lot of data in it so it can't be split, and one of the key requirements is to have one simple form. :(
 
Beansprout said:
There's always risk if you have One Large Textbox...what if the user accidentally deletes everything and that then goes through and is saved? They still have to re-type :(

Best thing is to ask your users to take care, or to use a text editor to write the Big Part, or copy the contents to the clipboard - as well as the autosave...perhaps with some protection for length changes :)

Yeah I know its crazy but this is a wacky internal corporate project and they are very picky on what they want, despite what we tell them!

All of your suggestions on writing it externally and pasting it in would be what I would do, but we have to assume next to no IT literacy. Fun stuff :D
 
Back
Top Bottom