Testing a Capture OnTheGo 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. This topic explains how to preview the form, and how to submit data and preview the submitted data.

Previewing the form

On a PC

A 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.

  • Within PlanetPress Connect Designer. You can open the Preview tab or the Live tab in the Workspace. This displays the output HTML along with any variable data being added. On the Live tab you can even fill out the form and submit it, and if the Get Job Data File on Submit option is enabled (via the toolbar of the same name), the Designer will receive an XML with the submitted data (see Get Job Data File on Submit ). However, remember that COTG Form elements are only functional in the COTG app, so they won't submit any data.
  • Within the default browser on your computer. Click the Preview HTML button in the toolbar. This opens your operating system’s default browser and displays the form in that context.
    In the Designer, you can test the responsiveness of a form using the Responsive Design button at the top right of the workspace.
    Some browsers also let you test the responsiveness of a form. In Firefox, for example, select Developer > Responsive Design to view a form in different sizes.

Previewing a COTG Template in the app

A 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:

  1. Go to the Capture OnTheGo Repository Login: https://config-us.captureonthego.com/.
  2. Login with your Store ID and Password.
  3. Go to the Users page.
  4. Add a new user. The user name should be in the form of an email address.

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 data

When 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 Submit

It 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:

  • Workflow has been installed on the local machine, and the Workflow HTTP/Soap Service has been started. To do this, in the Workflow menu, click Tools > Service Console, then right-click HTTP/Soap Server and start it.
  • In the Designer menu Window > Preferences > Web, the Workflow URL has been set to the correct host. The default is http://127.0.0.1:8080/_getSampleFormData_. This points to an internal process of the Workflow component running at that host.

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 email

Getting 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.

  1. Go to https://learn.objectiflune.com/.
  2. Create an account, or log in to your account.
  3. Go to your Profile Page, and click the API Key link.

Now, when creating or editing a COTG Form, you can use the API Key in the Form's action:

  1. Select the Form (see Selecting an element).
  2. On the Attributes pane, paste the following URL in the action field: https://learn.objectiflune.com/services/cotg-debug?__ol__auth_key={{APIKEY}}.
  3. Replace {{APIKEY}} by your API Key.

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

  • Eventually, when a user submits a Capture OnTheGo Form, the data are received by the Workflow HTTP Server Input task (see Workflow Help: HTTP Server Input) that has the same HTTP action as the one specified in the Form's action (see COTG Forms). The Workflow configuration should then handle the submitted data. But even if it doesn't, when no other tasks are present in that Workflow configuration, Workflow can output an XML file that contains the submitted data and save it in a location specified for the Send To Folder plugin in Workflow.
  • Contrary to the XML file obtained via the Get Job Data File on Submit option, this XML file does contain the actual data submitted by COTG elements, such as a signature or barcode.
  •  
    • Last Topic Update: 24/01/2017 09:32
    • Last Published: 7/6/2017 : 9:49 AM