> For the complete documentation index, see [llms.txt](https://docs.informationhub.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.informationhub.io/project/forms/offline-forms.md).

# Offline Forms

You can use forms to collect data without an internet connection. Submissions are stored on your device and uploaded later when you are back online.

{% hint style="info" %}
Offline forms are especially useful for field researchers collecting data in remote locations without reliable internet.
{% endhint %}

## How to collect data offline

### Step 1 - Save the form to your device

Do this while you still have internet access.

1. Open the form you want to use offline.
2. In the action bar at the top of the form view page, tap or click **Save for Offline** (the button has a bookmark icon).
3. The form structure is saved to your device. You can now use the form without a connection.

{% hint style="warning" %}
You must save the form for offline use **before** you lose your internet connection. The button will not be available once you are offline.
{% endhint %}

### Step 2 - Fill in the form in the field

4. Open the form as normal - even without internet access.
5. Fill in the form and tap **Submit**. The submission is stored locally on your device.
6. Repeat as many times as needed. Each submission is queued locally until you sync.

### Step 3 - Upload your submissions

7. When you have internet access again, go to **Jobs** in the home sidebar.
8. Your pending offline submissions appear as jobs. Click **Execute** on each job to upload the data to the server.
9. Once uploaded, the submitted data appears in the linked table.

{% hint style="info" %}
You can also click **Download** on a job to save a local copy of the submission data before uploading.
{% endhint %}

## Removing a form from offline storage

If you no longer need a form saved on your device, open the form and click **Remove from Offline** in the action bar (the same location as the Save for Offline button, shown in red when the form is already saved). This frees up storage space on your device. Any already-submitted responses that have not been uploaded yet are not affected.

## Saving your progress as a draft

If you are filling in a long form, you don't have to finish it in one sitting. You can save your answers as a draft and come back to them later, even if you close the app, reload the page, or navigate away.

{% hint style="info" %}
This applies to standard forms that create a new row (Insert-type forms). It is not available on Update-type forms, which edit an existing row.
{% endhint %}

### Saving a draft

1. While filling in the form, click **Save Draft** in the action bar at the top of the form.
2. The button changes to **Draft Saved** with a checkmark to confirm your answers were stored, and a confirmation message appears.

Your draft is saved locally on the device and browser you are using. It is not uploaded to the server and does not sync to other devices - if you switch to a different device or browser, you will not see the draft there.

### Returning to a form with a saved draft

When you reopen a form that has a saved draft, your answers are restored automatically - you don't need to do anything. A banner appears at the top of the form that reads "Draft restored from your last visit." to let you know your previous answers were brought back.

If you don't want the restored answers, click **Discard** on the banner. This clears the saved draft and resets the form to blank.

### When a draft is cleared automatically

Once you successfully submit the form, its draft is cleared automatically. The next time you open the form, it starts blank rather than restoring the old answers.

## Things to keep in mind

* Do not clear your browser data while you have unsynced submissions - this will delete the locally stored responses.
* Clearing your browser data will also delete any saved drafts, since drafts are stored the same way.
* File upload questions may not work offline depending on your device and browser. Test this before heading into the field.
