Forum: Ruby on Rails periodically autosave form

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Chris H. (Guest)
on 2009-05-09 06:39
(Received via mailing list)
Would someone show how to implement a periodical save of a form in the
background?  Same kinda thing that gmail does.  I would like to
autosave a form ajax wise so a technician in the field would have it
saved off in case of a wireless disconnect while filling out a form.

I would guess on doing the periodically call remote but how do you
submit the form?
Chris H. (Guest)
on 2009-05-09 06:51
(Received via mailing list)
A caveat,  It has to be done with the form already having been
created.  So doing an observe form with a form id will not work as the
form id id being generated by rails as it is in edit mode.
Glen (Guest)
on 2009-05-09 07:26
(Received via mailing list)
I am not sure about your situation, but  I would use observe_form set
and :frequency to seconds at which changes to this field will be
detected.  This should work with the existing form.

See the documentation.
Ram (Guest)
on 2009-05-11 13:54
(Received via mailing list)
In this case, he does not even have to observe the form.

He can just call a script on page load which shoots off an Ajax submit
and update on the form every minute or so.
This topic is locked and can not be replied to.