Here you can find instructions on how to:

After the form is created, it is necessary to create a custom form which will be displayed in the mobile device and make the data collection easier.

A custom form can be created in Mobile Data Collection Portal or Map Editor application using the Forms Manager tool found in the Tools tab. When you add or create a point layer in your map, you can choose that point layer to be a template for the form creation. In the Create from layer option choose the layer and the form with the attribute fields will automatically appear.

Create a new form

  1. Open Tools tab.
  2. Open Forms Manager.
  3. Click Create new form button.
  4. Write a form name and title. Form name will appear in Map Editor, and form title will appear in MDC on the mobile device.
  5. Add form items by choosing from the drop down list.
  6. Click Save button.

Untitled

Form field options

For form items you can add following options:

  1. Dependencies dependent fields will appear in the form if the rules are satisfied.
  2. Description provides an additional description of optional length to a particular field
  3. Persistent which remembers values from previous submission.
  4. Required which means that the submission can not be sent unless this field is populated.
  5. Default value which is one of the values in the form or the default value.
  6. Single line/multilne which allows you to write in a single line/multiple lines (for Text field).
  7. Autofill auto populate the field based on previously inserted values. More info here.

 

form-3

 

Connect form and layer

To collect data with the Mobile Data Collection, database point layer has to be connected with the form.

Note: if you are creating a project with the Mobile Data Collection Portal, form is automatically connected with the layer.

To connect a form with the layer, follow these steps:

  1. Open Layer Properties by clicking on the Layer tab and Edit Layer button.
  2. Click on the Attributes tab.
  3. Choose a custom form to use with the layer from the drop down list.
  4. NMT_Forms_Manager4

  5. Join each column with the corresponding form field from the drop down list e.g. column name is text_field, then from the drop down list Text field should be chosen.
  6. Click Save button.
  7.  

    Untitled2

You can also add some additional fields into the form but note that after that, you need to add these fields in your point layer (this can be done in the Database Manager) and attach it accordingly.

Refresh map and form on your mobile device and start collecting data!

Advanced options

Add an autocomplete text field – fixed list of values

An autocomplete text field can hold a list of fixed values and can work offline. The values can be searched in the form using a keyboard.

This option can only be set in Map Editor using JSON form structure (Tools tab – Forms Manager – Switch to JSON view)

Here is an example of the form autocomplete form field with the explanations:

{
“type”: “text”, — defines form field type, for autocomplete field, only text is supported
“uuid”: “field1”, — unique identifier for each form field. It doesn’t have to be complicated, it only has to be unique in the form
“name”: “designation”, — the name of the form field as stored in the database (spaces, capital letters are not allowed)
“persistent”: false, — defines if the last sent value will be preserved in the form
“required”: false, — defines if the field is required to be filled to be able to send the data
“title”: “Designation”, — the title of the form field that will be visible in the form
“description”: “This is an autocomplete field with a fixed list of values. It can work offline.”, — the description of the field that will appear in the form
“autocomplete”: { — starts the definition of the list of attributes
“data”: [ — starts a list of the values which will appear as a list of autocomplete values
{ “value”: “alpha”, — the value of the form field which will be stored in the database
“title”: “Alpha (α)” }, — the title of the form field which will appear in the form
{ “value”: “beta”,
“title”: “Beta (β)” },
{ “value”: “gamma”,
“title”: “Gamma (γ)”},
{“value”: “delta”,
“title”: “Delta (δ)”}]}}

Here you can find a full example of this form field which can be pasted to any user form.

Don’t forget to attach this form field to the layer as described above.

Autofill

Autofill retrieves the data from the closest point on the map based on the current position and fills the text box.

Autofil option can be added and edited without changing the structure of JSON. For more info click here.

  1. Open Forms Manager.
  2. From the drop down list select the form or create a new one. Note that forms created in Mobile Data Collection Portal (MDCP) are not editable. If you want to use the form created in MDCP, duplicate and save it.
  3. Switch to JSON view.
  4. Copy the form item syntax below. Paste it after “Items”: [ part in the JSON file
  5.  

     

    {
    “type”: “text”,
    “uuid”: “29594d11-faaf-4c12-9819-0557b364a8b2”,
    “name”: “test_column“,
    “persistent”: false,
    “required”: false,
    “title”: “Text field”,
    “description”: “”,
    “autocomplete”: {
    “layer”: “auto”,
    “queryExpression”: “test_column ILIKE ‘%${term}%'”,
    “valueExpression”: “${data.test_column}”
    }
    }

     

     

  6. Add comma (,) after the last bracket ( } ) if there are more form items after the autocomplete item.
  7. Rename column from test_column (bold letters in syntax above) to the column name where Autocomplete field will be connected and stored.
  8. Click Save.
  9.  

    Capture51

     

  10. In the Layer properties, under the Attributes tab select Autocomplete field from the drop down list next to column name and click Save.
  11.  

    Untitled6

     

  12. Layer and form in MDC on the mobile device should be auto-refreshed within a few minutes, but you can manually refresh them in MDC Settings.

 

 

Notes:

  • If layer is set “auto” in autocomplete item definition, autocomplete data will be shown from the layer with which the form is connected. You can set any database layer from the map by renaming “auto” in the layer name as it is written in Database.
  • It is also possible to set list of items that will be auto populated. Autocomplete will work as a select list with autocomplete search for those items. This option is useful for layers with large amount of data e.g. list of towns.

Send MDC data without coordinates

It is possible to send points without location information with Mobile Data Collection app.

  1. Open the map in Map Editor.
  2. Open Forms Manager.
  3. From the drop down list select the form or create a new one. Note that forms created in Mobile Data Collection Portal are not editable. If you want to use the form created in MDCP, duplicate and save it.
  4. Switch to JSON view.
  5. Copy the form item syntax below. Paste it after “title”: “Form name” and before “items”:[ in the JSON file
  6.  

    “noLocation”: true,

     

  7. Click Save.
  8.  

    Capture6

     

  9. Layer and form in MDC on the mobile device should be auto-refreshed within a few minutes, but you can manually refresh them in MDC Settings.
  10.  

    mdc_photo_cdv_photo_003_1463063097700