Actually I have an ExtJs script to create form with a Window below.
var frmAccount = Ext.create('Ext.form.Panel',{
bodyPadding: 5,
frame : true,
items :[
{
xtype : 'textfield',
fieldLabel : 'Account Number',
name : 'accountNum'
},{
xtype : 'textfield',
fieldLabel : 'Company',
name : 'company'
},{
xtype : 'textfield',
fieldLabel : 'Office',
name : 'office'
},{
xtype : 'textareafield',
fieldLabel : 'Address',
name : 'address',
width : 350
},{
xtype : 'textfield',
fieldLabel : 'City',
name : 'city'
},{
xtype : 'textfield',
fieldLabel : 'Country',
name : 'nation'
}]
});
var winAddAccount = Ext.create('widget.window',{
id : 'addAccount',
title : 'Filter Record',
width : 400,
height : 300,
modal : true,
closeAction : 'hide',
items : frmAccount,
layout : 'fit',
bodyPadding: 5,
buttons:[
{
text : 'Find',
handler: function(){
//console.log(form value);
}
},
{
text : 'Cancel',
handler: function(){
winAddAccount.hide();
}
}
]
});
I just want to get values from the form after I click 'Find' button.
But I don't know to get values from the form after I click 'Find' button.
hopefully I can see the value with console.log
script on handler.
Kindly please help me to solve or suggest an idea.
Thanks.