Search code examples
extjs4extjs4.1extjs-mvc

Getting field values from Window


I have a window. and some fields in it (textfield and button). Now i want to submit these details.

I get this error:

TypeError: button.up("form").getValues is not a function

Button function

buClicked : function (button,record) {
var val= button.up('form').getValues();
console.log(val.textfieldValue);
}

My Widow Definition

Ext.define('MyApp.view.WindowForm', {
    extend: 'Ext.window.Window',
    alias: 'widget.winform',
    id: 'winformid',

Solution

  • var val= button.up('form').getForm().getValues();