2019.2

Table Of Contents
'<div class="panel" role="control-wrapper"
style="position:relative;">' +
'<img role="photo" src="">' +
'<input role="photo-data" class="camera-dyn" name="' + cameraID +
'" type="hidden" value="' + value + '">' +
'</div>' +
'<button class="small" role="take-button" type="button">Take
now</button>' +
'<button class="small" role="pick-button"
type="button">Library</button>' +
'<button class="small" role="clear-button"
type="button">Clear</button>' +
'</div></label>';
$('#cameras').append(html); // add the camera object to the DOM
$('#' + cameraID).cotgPhotoWidget(); // init COTG widget
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.
How to use the COTG plugin is explained in the following topic: "Using the COTG plugin: cotg-
2.0.0.js" on page605.
To learn how to create widgets in code, see "Dynamically adding COTG widgets" on page608
and "Saving and restoring custom data and widgets" on page611.
For a list of all COTG elements and their intended use, see "COTG Elements" on page705.
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.
Page 616