Enketo on mobile when offline?

In a desktop web browser, you can queue up forms filled using Enketo for later submission? But this doesn't seem possible using Chrome on Android? If I'm filling out a form and I cut data/wifi it just shows an error on attempting to submit. If I "Add to Home Screen" and then cut my data/wifi it just shows as offline and won't let me interact with the form. Am I missing something and is there a way to use Enketo offline on a phone?

Hi Dan,

Enketo's main webform view works offline (including on Chrome on Android). See e.g. https://enke.to/x/widgets.

Enketo offers multiple views of the same form (using different API endpoints). I'm guessing, and hoping, that you may be using one of the online-only form views.

It's up to the app that integrates with Enketo to make clear to users whether the webform works offline or not. There is a way to check this yourself though by checking if the icon mentioned here is present: https://enketo.org/faq/#offline-use (also atm the URL includes the /x/ portion but that is subject to change in the future).

If you're using Central, I wrote a bit about this at Ideas and extensions for Central public links - #4 by LN. As @martijnr states, building your own links may not work forever and Central will eventually surface offline links. If you are on Central, do you want to use offline Enketo forms with authenticated Central users or for self-report through public links?

I've seen you give this warning and I've repeated it myself but now that it has come up again I'm curious to know more about your thinking. Do you see a change as likely? Given the number of Enketo links out there, it seems backwards compatibility would be important to maintain for a significant amount of time. Why not guarantee the link structure?

I'm mostly asking out of curiosity but it's also awkward for a system that separates frontend and backend such as Central. That is, only the backend knows about the key for communication with Enketo, but link building feels like more of a frontend concern. The current Enketo link building requirements mean either the backend has to ask Enketo preemptively for all link variants or when a link is configured through the frontend, the frontend has to make a request to the backend which then makes a request to Enketo backend. If I've misunderstood intended usage, feel free to let me know that, too!

Yes, would be on Central. As you guessed (and linked back to here) this forum post was related to the use-case explained here: https://github.com/getodk/docs/issues/1265#issuecomment-705689744

In this case, the form isn't particularly sensitive and if someone managed to get ahold of the link and start submitting fake data it would be easy to catch and more annoying than damaging. So a public link would probably be fine and easier.

1 Like