radiogroup

This component allows 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 elementsfrom 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 Configurationsthe following configurations can optionally be set: disabled, errorTarget, icon, labels, label Settings, onChange, 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 Configurationsthe following configurations can optionally be set: boxLabel settings, disabled, icon, labels, label settings.

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: