|
COTG ElementsWith the Designer you can create Capture OnTheGo templates. COTG templates are used to generate forms for the Capture OnTheGo mobile application. This topic is about Capture OnTheGo form elements. For more information about the application refer to these websites: Capture OnTheGo and Capture OnTheGo in the Resource Center. Capture OnTheGo (COTG) elements can only be added within a Form element in a Web context; see COTG Forms. For information about how to add and use COTG Elements, see Using COTG Elements. Barcode ScannerThe Barcode Scanner element adds a button to trigger the device to scan a barcode. A very large variety of barcode types are supported. Once the barcode has been scanned, the data from the barcode will be added to the COTG Form and submitted along with it. Using the Barcode Scanner element requires the installation of the
ZXing Barcode Scanner application on Android
devices. The application returns the barcode data after scanning.
CameraThe Camera element adds a group of buttons to capture or select an image. Once the image is selected via the camera or the device's library (aka "gallery"), it is saved within the Form data. When the form is submitted, the image is sent in a base64-encoded string format. Buttons
By default, the Camera element adds three buttons to the form:
To omit the Take now or Library button, edit the Camera element's properties: right-click the Camera element after adding it to the form, select Camera properties and then use the Source drop-down to select which buttons will be available: Take, Pick from library, or both. AnnotationsAnnotations can make a picture much more informative: an arrow, showing in which direction a car was driving; a circle, where the car has been damaged... To allow the user to make annotations, right-click the Camera element after adding it to the form, select Camera properties, and then check Allow annotations. Cropping/editingTo allow the user to crop or edit the image after taking or selecting it, select Camera properties, and then check Edit Images. Which editing options the user actually gets depends on the operating system of the device. On an Android device for example, the user may be able only to crop the image, while the user of an iOS device may select part of the image and rotate that selection. Image formatYou can set the format, quality and scaling for images that are submitted by the Camera element. Right-click the Camera element after adding it to the form, select Camera properties and edit the Image properties:
How to use the captured or selected image in a templateWhen the user has submitted the form, you may want to use the captured or selected image in a Designer template, for example in a letter or on a web page. To do this, insert a dummy image in the template, right-click it and select Dynamic Image. The Text Script Wizard appears. 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>). Date and Formatted DateThe 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 InfoThe 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. Fields TableThe Fields Table element adds a table with two rows, a delete button at the end of the first row and an add button at the end of the second row. Inside the rows you can put whatever elements you need. The user can click (or rather, touch) the Add button to add a row to the table. The new row will contain the same elements as the first row. The names of all elements in the first row will be extended with __0, while the names of the elements in the second row will be extended with __1, etc. GeolocationThe Geolocation Element adds a button to read the device's current GPS coordinates and save them in a form field. When the button is pressed, the GPS coordinates are requested and saved. When the form is submitted, the Geolocation data is sent in plain text. Image & AnnotationThe Image & Annotation element is meant to be used with an image that needs input from the user. When inserting an Image & Annotation element you have to select the image. The user can simply click (or rather, touch) the image to bring up the annotation dialog. Annotations can be made in a Marker (semi-transparent) or Pencil (solid) style, in different colors and with different widths. LocaleThe Locale Element does not have a UI element in the form. Inserting it adds a hidden input field that will contain the device's set locale when the form is submitted. This data is sent in plain text format and is available when processing the form data. The format is defined by the device. SignatureThe Signature Element adds a signature box to a COTG form. These
signatures are filled in via touch input, either with a finger or capacitive
pen. Touching the signature box opens up a fullscreen box used to sign
(generally more useful in Landscape mode depending on the device); after confirming, the dialog saves the data into the Form. Time and Formatted TimeThe Time element and the Formatted Time element display the current time on the device when the form is first opened. When the element is touched, a time selector appears so the user can modify this time. The Formatted Time element displays times in a format that depends on the locale of the device on which the user is viewing the form. A Time Element displays dates in the ISO 8601 format: HH:MM. When the form is submitted, the time data is sent as plain text. A Formatted Time element submits the time in both the ISO format mentioned above and in the format that depends on the device's regional and language settings. A Time element sends the time in the ISO format only. User AccountThe User Account Element adds a hidden field that contains the Capture OnTheGo user account (an email address) that was used to submit the form to the server. This is useful if a form is available to many different users, to detect who submitted it. |
|