getProperties()
returns an object with the available configuration attributes of the control
getProperties(id?: string): object;
Parameters:
id: string
- optional, the id of a radio button
Returns:
An object either with the available attributes of the control and their values, or with the available attributes of the radio button and their values.
Example
const form = new dhx.Form("form_container", {
rows: [
{
id: "radiogroup",
type: "radioGroup",
required: true,
label: "Radio Group",
labelWidth: 140,
labelPosition: "left",
helpMessage: " Help information",
value: "1",
options: {
rows: [
{
id: "1,"
type: "radioButton",
text: "Select 1",
value: "1",
},
{
id: "2",
type: "radioButton",
text: "Select 2",
value: "2"
},
]
}
}
]
});
// return object of the RadioGroup control
form.getItem("radiogroup").getProperties();
// return object of radio button of the control
form.getItem("radiogroup").getProperties("1");
The returned object of the RadioGroup control looks like:
{
errorMessage: "",
height: "content",
helpMessage: " Help information",
hiddenLabel: false,
label: "Radio Group",
labelPosition: "left",
labelWidth: 140,
options: {rows: Array(2), full: false},
padding: 0,
preMessage: "",
required: true,
successMessage: "",
width: "content"
}
The returned object of a radio button of the RadioGroup control looks like:
{
height: "content"
padding: 0
text: "Select 1"
width: "content"
}
You will find the description of these properties here.
Change log:
added in v7.0