2021.1

Table Of Contents
Capture OnTheGo API
As of Connect 1.8, cotg-2.0.0.js has replaced the cotg-1.x.js versions of the Capture OnTheGo
(COTG) plugin, introducing events and options for COTG widgets. This topic lists all available
options and custom events for widgets, as well as their initialization function.
With OL Connect 2021.1 the COTG library has been updated to version 2.1.0 to support nested
fields tables in COTG Fields Table elements. This also fixed an issue with the COTG Camera
Widget that occurred when it was used in a COTG Fields Table.
How to use the COTG plugin is explained in the following topic: "Using the COTG plugin" on
page599.
To learn how to create widgets in code, see "Dynamically adding COTG widgets" on page602
and "Saving and restoring custom data and widgets" on page606.
For a list of all COTG elements and their intended use, see "COTG Elements" on page700.
Barcode Scanner
cotgBarcode()
Initializing a Barcode Scanner element prepares it for user interaction.
Example: $('myScanner').cotgBarcode();
Events
The Barcode Scanner listens for the following events.
Event Description
clear.cotg Removes the scanned Barcode data.
scan.cotg Opens the scanner.
The Barcode Scanner broadcasts the following events.
Event Description
set.cotg This event is fired after Barcode data has been set to the value of the input.
Page 613