# Offline Form Submission with WeWeb

**URL:** <https://community.weweb.io/t/offline-form-submission-with-weweb/14073>\
**Category:** How do I?\
**Created:** [October 22, 2024, 8:35am UTC](https://community.weweb.io/t/offline-form-submission-with-weweb/14073 "2024-10-22T08:35:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Temitope.1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/temitope.1/32/14674_2.png) [@Temitope.1](https://community.weweb.io/u/Temitope.1)\
**Post date:** [October 22, 2024, 8:35am UTC](https://community.weweb.io/t/offline-form-submission-with-weweb/14073/1 "2024-10-22T08:35:06Z")

</div>

Hey everyone,

I’m working on a project where users might be in areas without internet, but they still need to fill out forms and submit data. I need the form to either submit in real-time when online, or save the data locally and then sync with the database once the user regains connection.

Does anyone have experience setting up something like this in WeWeb, or suggestions on how to handle offline form submission and syncing?

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![DanielL](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/daniell/32/13398_2.png) [@DanielL](https://community.weweb.io/u/DanielL)\
**Post date:** [October 25, 2024, 1:50pm UTC](https://community.weweb.io/t/offline-form-submission-with-weweb/14073/2 "2024-10-25T13:50:38Z")

</div>

Hi @Temitope.1 👋

Users need internet to first access the WeWeb app, since it is a web app.

If they lose connection, I think you could do this by creating an array called pendingSubmissions, saving it in local Storage:

 ![Zrzut ekranu 2024-10-25 133840](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/99a08c04c6e5c9e796584bc4a004c476ecb3bb84.png)

On page load: create workflow check if window.navigator.onLine = true && pendingSubmissions.length \> 0

- Is internet available? (window.navigator.onLine)
- Are there saved submissions? (pendingSubmissions.length \> 0)  
If both are true, submit the data, then clear local Storage.

---

<div class="post-metadata">

**Author:** ![Temitope.1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/temitope.1/32/14674_2.png) [@Temitope.1](https://community.weweb.io/u/Temitope.1)\
**Post date:** [October 31, 2024, 2:21am UTC](https://community.weweb.io/t/offline-form-submission-with-weweb/14073/3 "2024-10-31T02:21:48Z")

</div>

Thank you, i thought about this. But for this to work they need internet connection. to be able to even access the Form
