Is there a way for the form to capture the URL of the website where the form is embedded, or any parts of the HTTP request? I have two possible scenarios:
same form on multiple websites, and we want to determine which site was used to fill the form?
the http request can contains referrer id, and we want to capture it in the form?
I'd love to help, but your post does not contain enough information for me to answer your question. In general, the best way to get help is to fill out the questions in the pre-filled template that you get when you create a support post. So, with that in mind, can you answer these questions?
What ODK tool and version are you using? And on what device and operating system version?
What steps can we take to reproduce the problem?
What you have you tried to fix the problem?
Anything else we should know or have? If you have a test form or screenshots or logs, please attach.
Hi @marjeta! There are a lot of tools in the ODK ecosystem and so without the detail you've provided it was hard to understand the question. In this case, the issue is with Kobo, so your best bet is to ask the the Kobo team at http://help.kobotoolbox.org.
Kobo actually uses Enketo to perform its web-based form preview and submission. So if you are trying to capture this data specifically when submitting (ODK) forms via Enketo, your best bet might be to hop over to the enketo-users forum and see if anyone can help out. Although, several of the core Enketo folks - specifically @martijnr - lurk around here too, you may get a faster, more precise response there.
Just to be clear, as part of an enumerator submitting a form result, you also want to capture the URL of the original form that was used? Or something else?
I'm not sure what you mean by "original form".
I want to be able to distinguish between <base_url>?referrer=13 and <base_url>?referrer=42 --- it's the same form, but the URLs are different.
OK. I believe I understand now: when you deploy a form in Kobo, to be submitted via Enketo, you want to include a custom parameter in the Kobo's HTTP request (eg "referrer=123") that you'd like Enketo to pick up and include in the submitted form result's metadata.
I do not believe such a thing is possible in Enketo, and its certainly outside of the scope of ODK. Again, your best best would be to raise the request with Kobo and/or Enketo.