Barcode/QR code question type

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.

How to set up the “Barcode/QR code” question type

Setting up in formbuilder

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

Adding Barcode/QRCode questions

Setting up in XLSForm

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

How “Barcode/QR code” questions are displayed on web forms and KoboCollect

Default appearance

Default appearance of Barcode/QRCode questions

Advanced appearance

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.

Changing advanced Appearance in formbuilder

Go to the question settings of the “Barcode/QR code” question, and type “front” in the “Appearance (Advanced)” box

Changing appearance of Barcode/QRCode questions

Changing advanced Appearance in XLSForm

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.