radiogroup

This component enables exactly one option to be selected in a group of options.

Configuration

For general configuration options, see General component configuration.

Specific configuration

type ("radiogroup")

Type of component.

options (array<Radio>)

A list of radio elements from which the user can select a value.

value (Binding | number)

Value of the selected element.

General configuration

In addition to the configurations valid for all, the following configurations can optionally be set: disabled, errorTarget, icon, label, label settings, onChange, //readOnly, required.

Radio

This element is part of a radio group. It therefore does not have a type and can only be used in a radio group.

Specific configuration

value (number | string)

Value of the element. This attribute must be used.

General configuration

In addition to the configurations valid for all, the following configurations can optionally be set: boxLabel settings, disabled, //errorTarget, icon, label, label settings. //onChange, //readOnly, //required.

Example

radiogroup.json
{
  "$schema": "https://forms.virtimo.net/5.1.0/schema.json",
  "metaData": {
    "id": 0,
    "version": 0
  },
  "configuration": {},
  "components": [
    {
      "type": "container",
      "label": "Radiogroup Component Example",
      "components": [
        {
          "type": "radiogroup",
          "value": "${/data/radioGroup}",
          "options": [
            { "value": 1, "label": "one" },
            { "value": 2, "label": "two" },
            { "value": 3, "label": "three" }
          ]
        }
      ]
    }
  ],
  "state": {
    "data": {
      "radioGroup": 2
    }
  }
}
Embedded preview

Keywords: