Field | Required | Description |
Type | Yes | See this page on question types to learn more about what questions are supported Datasaur. |
Config | No | See GraphQL Input: QuestionConfigInput for the options |
Name | Yes | Column name in Row based labeling |
Label | Yes | How the field is displayed to the labeler in the Label Set extension |
Required | Yes | Is the question required to be answered by the labeler before proceeding? |
Examples of each question type are provided below.
{"type": "TEXT","config": {"multiple": true},"name": "Author","label": "Author","required": true}
{"type": "TEXT","config": {"multiline": true,"multiple": true},"name": "Quick Review","label": "Simple Review","required": true}
{"type": "DROPDOWN","config": {"multiple": true,"options": [{"id": "1","label": "Fiction"},{"id": "2","label": "Non fiction"}]},"name": "Genre","label": "Genre","required": true}
{"type": "HIERARCHICAL_DROPDOWN","config": {"multiple": true,"options": [{"id": "1","label": "A"},{"id": "2","label": "B","parentId": "1"},{"id": "3","label": "C"},{"id": "4","label": "D","parentId": "3"}]},"name": "Q4","label": "Question 4","required": false}
{"type": "DATE","config": {"format": "DD/MM/YYYY"},"name": "Publication Date","label": "Publication Date","required": true}
{"type": "TIME","config": {"format": "HH:mm"},"name": "Best Time Reading","label": "Best Time to Read","required": true}
You can set step to adjust the slider increment value.
{"type": "SLIDER","config": {"min": 1,"max": 10,"step": 1},"name": "Rate","label": "How would you rate this book?","required": false}
You can create questions nested within other questions. This example creates two sub text fields (ex: Age and Sub-genre) inside a question (ex: Type). For now we only limit nested questions to two levels of depth.
{"type": "NESTED","config": {"multiple": true,"questions": [{"type": "TEXT","config": {"multiline": false},"name": "Age","label": "Age","required": true},{"type": "TEXT","config": {"multiline": false},"name": "Sub-genre","label": "Sub-genre","required": true}]},"name": "Type","label": "Type","required": true}