|
Testing a Capture OnTheGo TemplateA 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. This topic explains how to preview the form, and how to submit data and preview the submitted data. Previewing the formOn a PCA Capture OnTheGo template can be previewed on a PC in two different ways. Note that Capture OnTheGo form elements will not be functional unless they are sent to a device.
Previewing a COTG Template in the appA COTG Template cannot only be previewed on a PC; it can also be previewed on a mobile device. This will show the template within the Capture OnTheGo mobile application, and all widgets will be functional. In order to test or use any Capture OnTheGo features you need to have a Repository account (also called a COTG Server account or the Store ID). You can get a trial account for this purpose; please see this page for more details: http://www.captureonthego.com/en/promotion/. Once you have your Store ID and Password, you also need to create a user account:
Next, make sure that the Capture OnTheGo mobile application is installed and that it is logged on as a known user of the Capture OnTheGo Repository. Now, with your Capture OnTheGo template open in the Connect Designer module, click on the Send COTG Test… button in the toolbar. Enter the appropriate information in the Send Test dialog (see Send COTG Test). Click Finish to send the document. It should automatically appear in the app's Repository and remain accessible for 2 days from the moment it is sent. Submitting and previewing dataWhen you hit the Submit button in a template in the Designer (on the Live tab), the submitted data can be sent back to the Designer in the form of an XML file (see below). The advantage of this is that you can immediately start creating a Data Mapping Configuration and use the data in a template. Data submitted from the Capture OnTheGo app can be sent to you in the form of an email or saved via a Workflow configuration. Both options are explained below. The Form's validation should ensure that the submitted data is valid. Set the Form's validation method to jQuery and set the requirements and a message per field (see Changing a Form's validation method and How to make COTG elements required).
Get Job Data File on SubmitIt is possible to test a COTG Form in the Designer and get access to an XML file that contains the submitted data, without having a Workflow configuration to handle the data. Remember, however, that COTG Form elements are only functional in the COTG app, so they won't submit any data. To use this option, click the Get Job Data File on submit toolbar button. This option requires that:
If these conditions are met, you can fill out the form in the Designer, in Live mode, and submit it. The data file will be sent directly to the Designer. In this case, the Form's action will not be taken into account. Once the Job Data File is received by the Connect server, a dialog appears asking where to store it. After saving the XML file to disk, you can view it, create or update a Data Mapping Configuration for it (see Data Mapping Configuration), and insert the data in a template, using the Data Mapping Configuration (see Personalizing content). Checkboxes and Radio buttons that are unchecked will not be submitted to the job data. This is standard behavior in HTML. One can work around that by adding a hidden field before the respective checkbox with the same name and for example value 0 (see Using COTG Elements).
Get submitted data via emailGetting submitted data via email requires the Form's action to be set to a test URL that contains an API Key. You can obtain an API Key as follows.
Now, when creating or editing a COTG Form, you can use the API Key in the Form's action:
When you submit the form in the COTG app (see Previewing a COTG Template in the app), the debug service will compose an HTML email that contains the form element names and the submitted values. Image files, like pictures and signatures, are added to the email as attachments. The email will be sent to the email address that you provided via your Learn profile. For a more detailed description of this test procedure, see this how-to: Testing a COTG template. Get submitted data via Workflow |
|