Skip to main content

Button

A simple button that can have an icon. A button can submit form data to a server.

Button form control styled as a blue flat Send button in DHTMLX Suite

Related sample: Form. All controls

Adding Button​

You can add a Button control during form initialization:

const form = new dhx.Form("form_container", {
rows: [
{
type: "button",
name: "button",
text: "Send",
size: "medium",
view: "flat",
color: "primary"
}
]
});

Properties​

View the full list of Button configuration properties.

Working with Button​

You can manage a Button control with the methods and events of the object that the getItem() method returns.

For example, you can disable the control:

form.getItem("button").disable();

Methods​

Check the full list of Button methods.

Events​

Check the full list of Button events.