Search the knowledge base, browse our resources, and visit our forum for more detailed information
Last updated: 18 Jun 2025
The “Barcode/QR code” question type is used for scanning, decoding and capturing barcodes and QR codes using the device camera. When a code is scanned with the camera the value (whether numbers or text) stored in the code is captured.
Barcode/QR code scanning only works when using KoboCollect on mobile devices.
A wide range of Barcode and QR code formats are supported, including the following:
UPC-A
UPC-E
EAN-8
EAN-13
Code 39
Code 93
Code 128
Codabar
ITF
RSS-14
RSS-Expanded
QR Code
Data Matrix
Aztec
PDF 417
MaxiCode
“Barcode/QR code” questions can be used in different scenarios including asset
management or item distribution. For example, you can scan a QR code on a
beneficiary identity card to capture their ID number. You can then use use the
pulldata()
function to automatically populate fields from a CSV attached to
your project or from a linked project with
information about the beneficiary. You can learn more about the pulldata()
function here.
To add a “Barcode/QR code” question:
Click the button to add a new question
Type the question text, for example “Collect the beneficiary identification code”, then click ADD QUESTION or press ENTER on your keyboard
Choose the question type
To add a “Barcode/QR code” question in XLSForm, add a question with type
barcode
as follows:
type |
name |
label |
---|---|---|
barcode |
beneficiary_id |
Capture the beneficiary ID code |
survey |
When adding the “Barcode/QR code” question type, you can change the appearance settings to switch from using the default (back) camera of the device to using the front camera.
Go to the question settings of the “Barcode/QR code” question, and type “front” in the “Appearance (Advanced)” box
In XLSForm, you can set the default camera for capturing the “Barcode/QR code”
to be the front camera by typing ‘front’ in the appearance
column as follows:
type |
name |
label |
appearance |
---|---|---|---|
barcode |
beneficiary_id_2 |
Capture the beneficiary ID code |
front |
survey |
You can download an XLSForm with examples from this article here.
Did you find what you were looking for? Was the information clear? Was anything missing?
Share your feedback to help us improve this article!
KoboToolbox is maintained by Kobo Inc.