Skip to content

Make a three-choice form

Let labelers answer one short question with the keyboard.

Verdict shows Correct, Incorrect, and Unclear together, with Correct selected.Verdict shows Correct, Incorrect, and Unclear together, with Correct selected.
Captured from this recipe’s downloadable configuration and sample data. Select image to enlarge.

Try this example: download the complete configuration and sample CSV. Open the configuration in MLabel, then load the CSV.

View the complete configuration
{
"$schema": "https://mlabel.vlad.gg/mlabel.schema.json",
"version": 2,
"network": {
"updateChecks": false,
},
"input": {
"fields": [
{
"name": "id",
"type": "text",
"display": "Record ID",
},
{
"name": "comment",
"type": "text",
"display": {
"title": "Customer comment",
"titlePosition": "above",
},
},
],
},
"output": {
"fields": [
{
"name": "id",
"type": "text",
"fill": {
"kind": "copy",
},
},
{
"name": "verdict",
"type": "enum",
"widget": "radio",
"display": "Verdict",
"choices": [
{
"name": "correct",
"display": "Correct",
},
{
"name": "incorrect",
"display": "Incorrect",
},
{
"name": "unclear",
"display": "Unclear",
},
],
},
],
},
}
View the sample CSV
id,comment
r001,The parcel arrived late and the box was torn.

Choose type: "enum" and widget: "radio" to keep all three options visible. Their name values are stored in the file; their display values are the words the labeler sees.

The built-in digits 1, 2, and 3 select options in their configured order. You do not need to define shortcuts for them.

The relevant setting is in output.fields.1. The download above includes the surrounding configuration.

{
"name": "verdict",
"type": "enum",
"widget": "radio",
"display": "Verdict",
"choices": [
{
"name": "correct",
"display": "Correct",
},
{
"name": "incorrect",
"display": "Incorrect",
},
{
"name": "unclear",
"display": "Unclear",
},
],
}

Click outside the form controls, then press 2. Incorrect should become selected. Export and check that verdict is incorrect, not the display text Incorrect.

On a multi-record assignment, Enter moves to the next record when a text-entry control is not consuming the key. With several choice fields, digits act on the focused choice field, or the first one if none is focused. Shortcut behavior →

Browse all illustrated recipes →