Radio Group field
Data
Key | Type(s) | Optional | Description |
---|---|---|---|
name | string |
The form field name, this value must be used as the input's name key |
|
type | string |
Different types of form fields such as text password email select range file |
|
label | string |
The label for the form field | |
required | boolean |
Indicates if the field is required for validation | |
options | array |
optional | Collection of options used by the select and range types. Only available when applicable |
conditional | array |
optional | Collection of options used by the select and range types. Only available when applicable |
Options
Selectable options within the select component. Only one option can be the selected one.
Key | Type(s) | Optional | Description |
---|---|---|---|
name | string |
The field name, same as the parents name | |
value | string |
The value that should be used by the parent when the option is selected or picked | |
label | string |
Label for the option |
Conditionals
Conditional fields for the selected field. Multiple conditionals can have the same on_value
value.
The data structure for conditional fields is identical to non-conditional fields.
Key | Type(s) | Optional | Description |
---|---|---|---|
name | string |
The form field name, this value must be used as the input's name key |
|
type | string |
Different types of form fields such as text password email select range file |
|
label | string |
The label for the form field | |
required | boolean |
Indicates if the field is required when the on_value matches |
|
options | array |
optional | Collection of options used by the field. Only available when applicable |
Example
{
"name": "CDRIVERSLICENSE",
"type": "radio-group",
"label": "Rijbewijs",
"required": false,
"css": "w-full",
"options": [
{
"name": "CDRIVERSLICENSE",
"value": "CDRIVERSLICENSEYES",
"label": "Ja"
},
{
"name": "CDRIVERSLICENSE",
"value": "CDRIVERSLICENSENO",
"label": "Nee"
}
],
"conditional": [
{
"name": "CDRIVERSLICENSESPEC",
"type": "checkbox-group",
"label": "Specifieer rijbewijs",
"required": false,
"on_value": "CDRIVERSLICENSEYES",
"css": "w-full",
"options": [
{
"name": "CDRIVERSLICENSESPEC",
"value": "DRIVERSLICENSESPECA",
"label": "A"
},
{
"name": "CDRIVERSLICENSESPEC",
"value": "DRIVERSLICENSESPECA3",
"label": "A3"
},
{
"name": "CDRIVERSLICENSESPEC",
"value": "DRIVERSLICENSESPECB",
"label": "B"
},
...
]
}
]
}