Microsoft.Common.OptionsGroup UI element

The OptionsGroup control lets users select one option from two or more choices. A user can select only one option.

Note

In the past, this control rendered the options horizontally. Now, the control presents the options vertically as radio buttons.

UI sample

Screenshot of Microsoft.Common.OptionsGroup UI element with vertically aligned radio buttons.

Schema

{
  "name": "element1",
  "type": "Microsoft.Common.OptionsGroup",
  "label": "Some options group",
  "defaultValue": "Value two",
  "toolTip": "",
  "constraints": {
    "allowedValues": [
      {
        "label": "Value one",
        "value": "one"
      },
      {
        "label": "Value two",
        "value": "two"
      }
    ],
    "required": true
  },
  "visible": true
}

Sample output

"two"

Remarks

  • The label for constraints.allowedValues is the display text for an item, and its value is the output value of the element when selected.
  • If specified, the default value must be a label present in constraints.allowedValues. If not specified, the first item in constraints.allowedValues is selected by default. The default value is null.
  • constraints.allowedValues must have at least one item.

Next steps