1.5

Table Of Contents
var value = event.detail.state["mywidget"];
value = value + $("#camera1 img").attr("src");
$("form p").html(value);
}, false);
With jQuery you must use event.originalEvent in the handler functions, for example:
$(window).on("olcotgsavestate", function(event) {
event.originalEvent.detail.state["mywidget"] = "test: ";
});
Note that you should register for the event directly in the JavaScript file (a separate JavaScript
file, preferably, not cotg-1.2.1.js). You should not do this on the document ready event.
The order of JavaScript file includes in the template does not matter.
Testing the template
A Capture OnTheGo (COTG) template will be used to create a form that can be downloaded,
filled out and submitted using the COTG app. Before starting to actually use the template, you
will want to make sure that it produces a form that looks good and functions as expected. How
to preview the form, how to submit data and how to preview the submitted data is described in
another topic: "Testing a Capture OnTheGo Template" on page369.
Sending the template to the Workflow tool
After testing the template (see "Testing a Capture OnTheGo Template" on page369) the
template must be sent to the Workflow module. Templates sent to the Workflow module can be
used in any process within it.
How to send the template and the corresponding Data Mapping Configuration to the Workflow
tool is explained in another topic: "Sending files to Workflow" on page259.
Next, you can start building a Workflow configuration that receives and handles the submitted
data. The configuration should start with a HTTP Server Input task (see Workflow Help: HTTP
Server Input) of which the HTTP action is the one specified in the COTG Form's action.
Page 352