This may not be as elegant as what you’d like, but I think what you’re after is possible using hidden fields and pre-filling Enketo responses via URL.
I can create this XLSForm:
type | name | label | relevant | calculation |
---|---|---|---|---|
hidden | collectorID | Collector ID | ||
note | missingCollectorID | Sorry: it looks like you’ve accessed this survey through an invalid link. Please check the URL and try again. | ${collectorID} = ‘’ | |
calculate | validSubmission | Submission is valid | ${collectorID} != ‘’ | |
begin_group | everything | ${collectorID} != ‘’ | ||
text | name | What is your name? | ||
text | quest | What is your quest? | ||
end_group |
…and then use one of the online-only Enketo options, e.g. “Online-Only (single submission)” combined with a query string that sets the response for the hidden collectorID
question, e.g. https://ee.kobotoolbox.org/single/::lZr49Upg?d[collectorID]=CAT_PEOPLE. Perhaps you’d want to obfuscate the question name / response value for the collector ID a little bit to prevent your respondents from manipulating the URLs.
An Excel export of data collected from this form looks like:
Collector ID | Sorry: it looks like you’ve accessed this survey through an invalid link. Please check the URL and try again. | Submission is valid | What is your name? | What is your quest? | _id | _uuid | _submission_time | _validation_status | _index |
---|---|---|---|---|---|---|---|---|---|
CAT_PEOPLE | true | Sam | To seek the Holy Grail! | 51882509 | d8e4bb6d-4bd1-4f4f-aaaa-96a55200d16f | 2020-05-01T20:07:52 | 1 |
People here with more creativity or time than me could probably make it a little bit prettier, but I think it illustrates the idea.