2022.1

Table Of Contents
How to use the captured or selected image in a template
After a user has submitted the form and the data has been extracted, you may want to display
the captured or selected image in a Designer template, for example in a letter or on a web
page. To do this:
1. Load the data mapping configuration (or at least the data model).
2. Insert a dummy image in the template.
3. Right-click the dummy image and select Dynamic Image. The Text Script Wizard
appears.
4. Under Field select the field that contains the base64-encoded string. The script puts the
given string in the source (src) attribute of the image (<img>).
Instead of using the Text Script Wizard, you could also write a script yourself; see "Writing your
own scripts" on page918.
Date and Formatted Date
The Date element and the Formatted Date element display the current date on the device when
the form is first opened. When the element is touched, a date selector appears so the user can
modify this date. The Formatted Date element displays dates in a format that depends on the
locale of the device on which the user is viewing the form. A Date Element displays dates in the
ISO 8601 format: YYYY-MM-DD.
When the form is submitted, the date data is sent as plain text. A Formatted Date element
submits the date in two formats: in the format that depends on the device's regional and
language settings and in the ISO format mentioned above (using a hidden field). A Date
element sends the date in the ISO format only.
Device Info
The Device Info Element adds a field that contains some information about the device (phone
or tablet) that is submitting the COTG Form. This includes the device's type (Android or iOS),
operating system version, device model and its UUID (Universally Unique Identifier). This
information can be useful for both troubleshooting, if errors occur on specific device types for
example, as well as for security validation: it is possible to maintain a list of device UUIDs that
are allowed access, to prevent unauthorized use even if someone has a user name and
password to a repository.
Page 623