nos-forms-jquery

Type

radio

Example with all options

{
    "name": "radioExample",
    "type": "radio",
    "label": "Radio Example",
    "formGroup": true,
    "required": true,
    "data": {
        "field": 0,
        "testing": 123,
    },
    "disabled": false,
    "inline": true, // display radio options inline. this basically just changes the bootstrap layout for radio controls
    "checked": "value1", // accepts a value from the options below
    "options": {
        "value1": "First Option",
        "value2": "Second Option",
        "value3": "Third Option"
    }
}

More practical example

{
    "name": "radioExample",
    "type": "radio",
    "label": "Radio Example",
    "required": true,
    "inline": true, // display radio options inline. this basically just changes the bootstrap layout for radio controls
    "checked": "value1", // accepts a value from the options below
    "options": {
        "value1": "First Option",
        "value2": "Second Option",
        "value3": "Third Option"
    }
}

Radio Options

There are a few ways to enter your radio options.

"options": {
    "value1": "First Option",
    "value2": "Second Option"
}
"options": [
    {
        "value1": "First Option"
    },
    {
        "value2": "Second Option"
    }
]
"options": [
    "First Option",
    "Second Option"
]