Radio Button

Radio buttons form a group of which only one value can be selected.

Tag

"type": "radio"

Values

The radio type supports the following values:

options

An array of options of which a user can choose one.

Argument Passed to the Device

This section describes the value (VALUE_FROM_THE_USER) which will get passed to the device. Read the Parameters section of the device.execute method for the general structure of the argument.

The value will be the name of the option which is selected.

Example

This example shows how this type of option will look in the webapp.

Option configuration

{
    "name": "Would you like to have sugar in your coffee?",
    "type": "radio",
    "id": "radio-1",
    "values": {
        "options": ["Yes", "No"]
    }
}

Result

radio example

passed value:

{
    "id": "radio-1",
    "value": "Yes"
}