A component that allows a Toloker to add and remove list items, such as text fields to fill in.
This way you can allow a Toloker to give multiple answers to a question.
View exampleThe list items can contain any component, including a list of other components. For example, this allows you to create a table where you can add and delete rows.
View exampleTo add a new list item, Tolokers click the button. To remove an item, they click the x
icon. The icon appears when hovering over the list item.
To prevent a Toloker from adding too many list items, set the maximum list length. You can also use the editable
property to block Tolokers from changing a component, like when a certain event occurs.
Name | Type | Description |
---|---|---|
type * | "field.list" | Set component type. |
data * | writable | Data with values that will be processed or changed. Learn more about working with data. |
label | string | Label above the component. |
addedItems | array | – |
addedItems[] | view | – |
buttonLabel | string | Text on the button for adding list items. |
direction | string | The direction of the list:
|
editable | boolean | A property that indicates whether adding and removing list items is allowed. Set false to disable. By default it is true (allowed). |
hint | string | Hint text. |
maxLength | number | Maximum number of list items. |
minLength | number | – |
removeVariant | string | – |
render * | view | Interface template for list items, such as a text field. In nested field.* components, use data.relative for recording responses, otherwise all the list items will have the same value. |
size | string | The distance between list items. Acceptable values in ascending order: s , m (default). |
validation | condition | Validation based on condition. |