Radio button
Radio buttons control
Parameters you can pass
Parameter | Data type | Description |
---|---|---|
type | string | Type of input (hidden, text, etc) |
name | string | Name of input that will be used in the form |
value | string | Input value |
id | string | Input ID |
label | string | Radio button text label |
class_name | string | Wrapper class (if several classes passed, divide them by Space) |
text_class_name | string | Text label class (if it was passed) |
disabled | bool | Shows if it's disabled |
selected | bool | Shows if it's selected |
Default
self.render({ ref: '/tmpl/controls/radio.twig' }, {
name: 'radio',
id: 'my-radio',
label: 'Value 1'
});
Selected
self.render({ ref: '/tmpl/controls/radio.twig' }, {
name: 'radio',
label: 'Value 1',
selected: true
});
Disabled
self.render({ ref: '/tmpl/controls/radio.twig' }, {
name: 'radio',
label: 'Value 1',
disabled: true
});
Updated 5 months ago