RadioGroup
A control that groups Radio buttons.
Related sample: Form. All controls
Related sample: Form. Radio group
Related sample: Form. Change Form configuration
Adding RadioGroup
You can add a RadioGroup control during form initialization:
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 RadioGroup configuration properties.
Properties of RadioButton
View the full list of properties that you can set for a RadioButton in RadioGroup.
Working with RadioGroup
You can manage a RadioGroup control with the methods and events of the object that the getItem() method returns.
For example, you can get the value of the control:
const value = form.getItem("radiogroup").getValue();
Methods
Check the full list of RadioGroup methods.