getProperties()
returns an object with the available configuration attributes of the control
getProperties(id?: string): ICheckboxGroupProps | ICheckboxGroupItemProps;
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"
},
]
}
}
]
});
form.getItem("radiogroup").getProperties();
// -> the returned object for the RadioGroup control
{
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"
}
form.getItem("radiogroup").getProperties("1");
// -> the returned object for the specified radio button of the control
{
height: "content"
padding: 0
text: "Select 1"
width: "content"
}
The returned object of the RadioGroup control can contain the following configuration attributes:
options | (object) an object with options of a RadioGroup |
width | (string|number|"content") the width of a control |
height | (string|number|"content") the height of a control |
padding | (string|number) sets padding between a cell and a border of a RadioGroup control |
required | (boolean) defines whether a control is required |
label | (string) specifies a label for a control |
hiddenLabel | (boolean) invisible label that will be used to identify the input on the server side |
labelPosition | (string) defines the position of a label: "left"|"top" |
labelWidth | (string|number) sets the width of the label of a control |
helpMessage | (string) adds a help message to a control |
preMessage | (string) a message that contains instructions for interacting with the control, applied for all radio buttons in a group |
successMessage | (string) a message that appears in case of successful validation of the control value, applied for all radio buttons in a group |
errorMessage | (string) a message that appears in case of error during validation of the control value, applied for all radio buttons in a group |
RadioButton properties
text | (string) the text label of a radio button |
width | (string|number|"content") the width of a control |
height | (string|number|"content") the height of a control |
padding | (string|number) sets padding between a cell and a border of a radio button |
Change log:
added in v7.0