kobotoolbox / enketo-express

We've moved! Please use the new repository 🠊 https://github.com/enketo/enketo-express
Apache License 2.0
102 stars 90 forks source link

Cannot fill offline forms #1070

Closed moulinaparole closed 6 years ago

moulinaparole commented 6 years ago

Hello, I've started toying a bit with Enketo-Express and ODK Aggregate and was wondering if I had any perticular setup to do to allow the offline submission (into the cache of the web browser application)?

I have Enketo running on an Amazon Ubuntu Server and ODK Aggregate on a google app engine server.

Everything runs fine in online mode on my phone, but as soon as I switch to offline mode, I cannot input any values or go to the next page of my form, I can only see the page on which I was before switching to offline.

I'm not sure what to do.

Thank you,

Julien

MartijnR commented 6 years ago

Hi Julien,

ODK Aggregate has 1 API endpoint hardcoded (and used when clicking the Enketo button). It is this endpoint:

POST /survey

Enketo Express has 2 API versions, v1 and v2. That particular endpoint works differently between those versions. My guess is that you've configured api/v2, in which the /survey endpoint is online-only. In api/v1, it is offline-capable.

See documentation here: apidocs.enketo.org.

Please re-open if that's not the solution and please mention an example Enketo webform URL you are testing.

moulinaparole commented 6 years ago

Yes, that was exactly it, thank you very much!