Skip to main content

Adding a QR/Barcode scanner to a field

It is possible to add barcode/qr code scanner functionality to a field, as of version 11819.
To do this, add the following snippit to the headers and scripts for the given entity and adjust accordingly.

<script type="text/javascript" src="node_modules/html5-qrcode/html5-qrcode.min.js?2.3.8"></script>
<script type="text/javascript" src="script/qr.js"></script>
<script type="text/javascript">
  $(() => {
    enableScanner("[FIELD SYSTEM NAME]")
    // Alternative, if it is allowed to change the field value manually
    enableScanner("[FIELD SYSTEM NAME]", readonly = false)
  })
</script>