FieldSet
objects allow you to define complex multi-level components for data collection.
Returns a dictionary
response with key-value pairs defined by its child fields.
{
"type": "field_set",
"field_id": "name",
"title": "Name",
"fields": [
{
"type": "text",
"field_id": "first_name",
"title": "First Name"
},
{
"type": "number",
"field_id": "last_name",
"title": "Last Name"
}
]
}
Parameter | Type | Default | Description |
---|---|---|---|
type* | string | For FieldSet objects, this should be set to field_Set | |
field_id* | string | A unique identifier for the field, which should not change among tasks within a project. | |
title* | string | Field title to be displayed to taskers. This should be short and singular. This may change among tasks within a project. | |
description | string | undefined | A brief description about what the response should be. This may change among tasks within a project. |
fields* | array | An array of child UnitField and FieldSet objects. Must contain at least 2 elements. | |
inline | boolean | false | If this is true, the fields array above must have a maximum of 2 elements and they must be TextField or NumberField objects. |
hint | string | undefined | Longer explanation of why the field exists and how it should be used. Renders as a tooltip. |
required | integer | false | Determines whether or not a response for this field is required. |
min_responses_required | integer | 1 | The minimum number of separate annotations allowed for this field. Must be larger than 0. |
max_responses_required | integer | 1 | The maximum number of separate annotations allowed for this field. Must be larger than or equal to min_responses_required, with an upper bound of 100. |