Skip to main content

Button

A simple button that can have an icon. Button can be twoState and can have a badge with a number, which can be useful for displaying the number of new messages, etc.

Button control

Related sample: Form. All DhxForm Inputs

Adding Button#

You can easily add a Button control during initialization of a form:

var 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 configuration properties of the Button control.

Working with Button#

You can manipulate a Button control by using methods or events of the object returned by the getItem() method.

For example, you can disable a control on a page:

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

Methods#

Check the full list of methods of the Button control.

Events#

Check the full list of events of the Button control.