Matrix field

A matrix field collects answers in a grid, with a row for each item and columns for the available choices. Use it when respondents need to answer the same question for several items.

For shared field properties, see shared properties.

Configuration

NameTypeRequiredDefaultDescription
rows{ id: string, label: string }[]Yes—Grid rows. Row IDs must be unique within the field.
options{ id: string, label: string }[]Yes—Grid columns. Option IDs must be unique within the field.
multiplebooleanNofalseSet to true to let respondents select several columns per row.

Validation

When the shared required property is true, every row must have an answer. If any row is unanswered, the respondent cannot continue or submit until they answer it.

Submission value

Answers use flat keys made from the field name and row ID, in the form "<name>.<rowId>". With multiple: false, each value is a column ID string. With multiple: true, each value is an array of column ID strings. Older submissions may store answers in a nested object.

{ "service_feedback.speed": "great", "service_feedback.quality": "ok", "service_feedback.support": "great" }

Example

{ "type": "matrix", "name": "service_feedback", "label": "How satisfied are you with each area?", "rows": [ { "id": "speed", "label": "Delivery speed" }, { "id": "quality", "label": "Product quality" }, { "id": "support", "label": "Customer support" } ], "options": [ { "id": "poor", "label": "Poor" }, { "id": "ok", "label": "OK" }, { "id": "great", "label": "Great" } ], "multiple": false, "required": true }