DevExtreme jQuery/JS - Add a Button

You can add a button that performs a custom action using a button item by setting the itemType option to "button". Then, configure the button using the buttonOptions object which can contain any Button widget option.

JavaScript
  • $(function() {
  • $("#formContainer").dxForm({
  • formData: {
  • name: "John Heart",
  • email: "jheart@dx-email.com"
  • },
  • colCount: 2,
  • items: [
  • "name",
  • { itemType: "empty" },
  • "email",
  • {
  • itemType: "button",
  • alignment: "left",
  • buttonOptions: {
  • text: "Send an Email",
  • onClick: function () {
  • // ...
  • }
  • }
  • }
  • ]
  • });
  • });

View Demo

See Also