Radio button

Radio buttons control

Parameters you can pass

ParameterData typeDescription
typestringType of input (hidden, text, etc)
namestringName of input that will be used in the form
valuestringInput value
idstringInput ID
labelstringRadio button text label
class_namestringWrapper class (if several classes passed, divide them by Space)
text_class_namestringText label class (if it was passed)
disabledboolShows if it's disabled
selectedboolShows 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
  });