Contact form that holds form data locally if there is no network (Offline)

147 views Asked by At

I am looking to build a contact form that will send off data if its connected to the internet. If there is no network, it will need to store its data locally (iPad, iPhone etc...). When it gets back into network range it will then submit the form.

Any help in the right direction will be greatly appreciated.

Thank you.

2

There are 2 answers

0
Bas van Dijk On

You could use localstorage to store the form data. Then try to send the data if it fails try it again after some time. The downside would be the user needs to stay on the page or the submit script will be cancelled. Your could use http://www.jstorage.info/ for easy localstorage.

0
ilivewithian On

We have had a lot of success using http://github.hubspot.com/offline/docs/welcome/