RadioGroup
A control intended for creating groups of Radio buttons.
Related sample: Form. All controls
Related sample: Form. Radio group
Related sample: Form. Change Form configuration
Adding RadioGroup
You can easily add a RadioGroup control during initialization of a form:
const form = new dhx.Form("form_container", {
rows: [
{
id: "radiogroup",
name: "radiogroup",
type: "radioGroup",
required: true,
label: "Radio Group",
labelWidth: 140,
labelPosition: "left",
helpMessage: " Help information",
value: "1",
options: {
rows: [
{
type: "radioButton",
text: "Select 1",
value: "1",
},
{
type: "radioButton",
text: "Select 2",
value: "2"
},
]
}
}
]
});
Properties of RadioGroup
View the full list of configuration properties of the RadioGroup control.
Properties of RadioButton
View the full list of properties that you can provide in the configuration object of a RadioButton of the RadioGroup control.
Working with RadioGroup
You can manipulate a RadioGroup control by using methods or events of the object returned by the getItem() method.
For example, you can get the value of the control:
const value = form.getItem("radiogroup").getValue();
Methods
Check the full list of methods of the RadioGroup control.