2022.1

Table Of Contents
Tip
Click the Edges button on the toolbar t emporarily adds a frame to certain elements on
the Design tab. These will not .Print or output.
How to make COTG elements required
To make a COTG element required, or to change the validation of a COTG Form, right-click the
element and choose Validation settings. Set the Form's validation method to jQuery and set
the requirements and a message per field. For an explanation see "Changing a Form's
validation method" on page754.
Changing widget settings in HTML
The Camera and Geolocation widgets have configurable options; you can decide which
buttons will be visible in the Camera element, for example. A number of these options can be
set via the user interface (see "Element specific settings" on the previous page).
The settings are stored in JSON format in the data-params attribute of the element in the
HTML, as you can see on the Source tab in the Designer after making a setting.
All options, including options that cannot be set via the user interface, can be set via this data-
params attribute. To define a timeout of 6 seconds for a Geolocation element, for example, you
could switch to the Source tab and change its HTML to:
<div id="geolocation1" role="cotg.Geolocation" data-params="
{&quot;timeout&quot;:6000}">.
Settings in the HTML override the default settings for that element. They are applied to the
widget when the Form is created and cannot be changed afterwards.
For a complete list of options see the Capture OnTheGo API: "Capture OnTheGo API" on
page652.
Settings for a dynamically added element can be made in code; see "Dynamically adding
COTG widgets" on page642.
The default settings that are specified in the COTG plugin can also be changed in code; see
"Changing default settings for widgets" on page640.
Page 629