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 () {
- // ...
- }
- }
- }
- ]
- });
- });
See Also
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.