RadioList

Extends ListBase
Namespace Limbo.Forms.Models.Fields
Type radioList

The RadioList is field similar to a group of HTML <input type="radio" /> elements.

Properties

The class has the following properties:

C# Name C# Type JSON Name Description
Type string type Inherited from the FieldBase class.
The type of the field - generally matching the HTML type attribute, or a custom value for non-HTML fields.
Name string name Inherited from the FieldBase class.
The name of the field - matching the value for the HTML `name` attribute.
Label string label Inherited from the FieldBase class.
A friendly name that should accompany the field.
Description string description Inherited from the FieldBase class.
A description that should accompany the field.
IsRequired bool required Inherited from the FieldBase class.
Whether the field is required/mandatory.
Value object value Inherited from the FieldBase class.
An optional value of the field.
Items List<ListItem> items Inherited from the ListBase class.
The individual items making up the checkboxes of the checkbox list.

JSON Output

{
  "type": "radioList",
  "name": "myRadioList",
  "label": "My radio",
  "description": "A description for my radio list.",
  "required": true,
  "value": "1234",
  "items": [
    {
      "value": "1",
      "label": "1",
      "checked": false
    },
    {
      "value": "12",
      "label": "12",
      "checked": false
    },
    {
      "value": "123",
      "label": "123",
      "checked": false
    },
    {
      "value": "1234",
      "label": "1234",
      "checked": true
    },
    {
      "value": "12345",
      "label": "12345",
      "checked": false
    }
  ]
}