Input and output data

The input data fields define the types of objects that you pass to the performer in the task. For example, a link to an image, text, or coordinates.

The output data fields determine the types of objects you will get as a result of task completion. For example, text or photo.

Add input and output data fields to the project Specifications to then use them later in the HTML block of the tasks, as well as in the Name and Description of the tasks on the map.

To add a field:
  1. Click the Add field button.
  2. Enter the Name.
  3. Choose the Type.
  4. Mark the field as Required. Use optional output fields, for example, for additional comments that the performers can provide if they want to.
  5. Fill in other parameters if needed. For example, set the minimum length of the string.
  6. Click the Save button.

You can work with fields both in the visual mode and in the JSON format. To switch the modes, click the button on the right.

Example of input and output data fields

In the task, the performer will see the text (string data type) for moderation or translation. The result is also a string you can use to save the value of radio buttons or a dropdown list, or a text entered in the field. The task format, including the response type, is described in the task interface.

To edit an existing field:

  1. Point the cursor at the field and click the button.
  2. Change the field parameters.
  3. Click the Save button.
Attention. If you edit a required field, the changes apply only to new pools. Existing pools will work according to the previous version of the project.
Field settings

Parameter

Parameter in JSON

Description

Name

id

Field ID. Only Latin letters, numbers, hyphens and underscores are allowed.

Type

type

Data type:

  • string

  • url

  • boolean

  • number

  • float

  • file
  • coordinates

  • json

For arrays, add the array_ prefix to the field type in JSON mode. For example: array_file.

Required

required

Whether the field must be filled when uploading the tasks for the input data.

Whether the performer's response is required in the output data.

By default, fields are optional — false.

Hidden

hidden

The attribute marks the fields hidden from the performer, only for the input data.

By default, the field is visible — false.

Arrayarray_<type>Array of objects of the same type. Used, for example, for multiple photos uploaded by a performer.

In JSON mode, there is a separate data type for the array. For example: "type": "array_file".

Min size

min_sizeMinimum number of items in the array.
Max sizemax_sizeMaximum number of items in the array.

Allowed values

allowed_values

Allowed values for string, integer, float and boolean data types.

Min length

min_length

Minimum length of the string.

Max length

max_lengthMaximum length of the string.

Min value

min_valueMinimum values for float and integer numbers.

Max value

max_valueMaximum values for float and integer numbers.
Current location

current_location

Saving performer's current location (true/false). Only for the coordinates data type. Used in tasks for the mobile app.

The default value is false.

pattern

Regular expression that the string must match. Only available in JSON format.

Example fields in JSON format

String
"my_string": {
    "type": "string",
    "required": true,
    "min_length": 10,
    "max_length": 100,    
    "allowed_values": ["a11", "b22", "c33"],
    "pattern": "^[a-zA-Z0-9]"
}
URL
"my_url": {
    "type": "url",
    "required": true
}
Boolean
"my_boolean": {
    "type": "boolean",
    "required": true
}
Integer
"my_integer": {
    "type": "integer",
    "required": false,
    "min_value": 1,
    "max_value": 100,
    "allowed_values": [10, 20, 30]
}
Float
"my_float": {
    "type": "float",
    "required": true,
    "min_value": 10.11,
    "max_value": 65.51
    "allowed_values": [10.15, 20.15, 30.15]
}
File
"my_file": {
    "type": "file",
    "required": true
}
Array of files
"my_file_array": {
    "type": "file_array",
    "required": true,
    "max_size": 5
}
Coordinates
"my_coordinates": {
    "type": "coordinates",
    "required": true
}
JSON
"my_json": {
    "type": "json",
    "required": true
}