Hi,
I am wondering whether it is possible to generate and display a QR code or barcode which contains the participant’s study Identifier?
Best wishes
Catherine
Hi,
I am wondering whether it is possible to generate and display a QR code or barcode which contains the participant’s study Identifier?
Best wishes
Catherine
@cp622 Welcome back to the forum! Could you share a bit more detail about your workflow?
Specifically, it would help to know when the ID is generated, who needs to view or scan the QR code, and whether it’s meant for re‑identification or another purpose. With that context, we can point you toward a more precise solution.
If you wish to generate a QR code in general, with whatever text, URL, etc you want, then there a lots of free online website that will do it for you: eg https://www.the-qrcode-generator.com/ Look for one that supports plain text and not just URLs. Or, if you are comfortable with programming, then there are also tools like qrcode · PyPI that will similarly generate a PNG image file with whatever QR code content you like; this is good if you need to generate QR codes offline in the field.
However, iIf you want to generate a QR code within KoboCollect (only, this does not work in Enketo/Kobo web forms) then you can also do so, but it is a bit more involved. It requires using a text question in your form and a calculation to generate a specific HTML markup string, which is then interpreted by a printer appearance to generate the resulting QR code image that can be displayed within the KoboCollect app.
There is some documentation about how to do this here: Question Types - ODK Docs
And/or try this form and run it under KoboCollect:
CreateQRCode.xlsx (14.8 KB)
After entering your personal details, it will produce a scan-able QR code image containing the data as a space-separated string:
Hi @jorcabrera and @Xiphware
Many thanks for your replies.
@Xiphware your solution works as I hoped it would. thank you very much for providing the clear example.
I am hoping our study team can use the QR code which just has the participant StudyID, then they can scan this QR code at each station rather than re-entering studyID each time. This hopefully will reduce typos.
Best wishes
Catherine
Glad to hear its working out for you ![]()