开发者

How to discover if an Ext.FormPanel is changed

开发者 https://www.devze.com 2023-01-06 11:56 出处:网络
i\'ve some Ext.FormPanel and i want to enable the \"Save\" button only when the user changes the values inside the form. How can i discover 开发者_Python百科that the user changed some fields ?

i've some Ext.FormPanel and i want to enable the "Save" button only when the user changes the values inside the form. How can i discover 开发者_Python百科that the user changed some fields ?

I've tried with form.on("change"), SelectionMode but without any success.


Simply check

var myFormPanel = // get a reference to the form panel
if (myFormPanel.getForm().isDirty()) {
    // submit your form
}

in your click-handler on the "Save"-button.

0

精彩评论

暂无评论...
验证码 换一张
取 消