2018.1

Table Of Contents
Get submitted data via Workflow
Eventually, when a user submits a Capture OnTheGo Form, the data are received by the
Workflow HTTP Server Input task (see Workflow Help: HTTP Server Input) that has the same
HTTP action as the one specified in the Form's action (see "COTG Forms" on page463). The
Workflow configuration should then handle the submitted data. But even if it doesn't, when no
other tasks are present in that Workflow configuration, Workflow can output an XML file that
contains the submitted data and save it in a location specified for the Send To Folder plugin in
Workflow.
This XML file contains the actual data submitted by all Form elements, including COTG
elements, such as a signature or barcode.
Using the COTG plugin: cotg-2.0.0.js
A Capture OnTheGo (COTG) Form may contain special COTG input elements, like a
Signature, Geolocation, or Camera element. These elements do not function without the COTG
JavaScript library. It is this library that links the controls with hardware features on the mobile
device.
As of Connect 1.8, cotg-2.0.0.js replaces the cotg-1.x.js versions of the library. The new COTG
plugin introduces options and custom events for COTG widgets. This greatly simplifies event-
based programming in Capture OnTheGo Forms. For example: your code can now
automatically set a date for a Date field and retrieve the Geolocation as soon as a form has
been signed.
All available options and events are listed in the Capture OnTheGo API: "Capture OnTheGo
API" on page510.
This topic explains in detail how to add the COTG plugin, how to change the defaults for COTG
widgets and how to use events.
How to add COTG elements to a Form dynamically is explained in another topic: "Dynamically
adding COTG widgets" on page502.
It is assumed that you have a basic understanding of HTML forms, CSS, JavaScript, and
jQuery. Examples on this page use jQuery.
About jQuery
This version of the COTG library is entirely based on jQuery. jQuery is a JavaScript library that
makes it very easy to select elements in a web page using HTML and CSS selectors, and to
Page 499