getProperties()
returns an object with the available configuration attributes of the control
getProperties(): IButtonProps;
Returns:
An object with the available attributes of the control and their values.
Example
const form = new dhx.Form("form_container", {
rows: [
{
type: "button",
name: "button",
text: "Send",
size: "medium",
view: "flat",
submit: true,
color: "primary"
}
]
});
form.getItem("button").getProperties();
// -> the returned object:
{
circle: false,
color: "primary",
full: false,
height: "content",
icon: "",
loading: false,
padding: 0,
size: "medium",
submit: true,
text: "Send",
url: "",
view: "flat",
width: "content"
}
The returned object of the Button control can contain the following configuration attributes:
text | (string) the text label of a button |
submit | (boolean) enables the button to send form data to a server |
url | (string) the URL the post request with form data will be sent to (if the submit property is set to true) |
width | (string|number|"content") the width of a control |
height | (string|number|"content") the height of a control |
icon | (string) an icon of the button |
view | (string) defines the look of a button: "flat"|"link" |
size | (string) defines the size of a button: "small"|"medium" |
color | (string) defines the color scheme of a button: "danger"|"secondary"|"primary"|"success" |
full | (boolean) extends a button to the full width of a form |
circle | (boolean) makes the corners of a button round |
loading | (boolean) adds a spinner into a button |
padding | (string|number) sets padding between a cell and a border of a button control |
Change log:
added in v7.0