Sencha touch 触摸表单忽略提交的值
我正在提交一个表单,但神奇的是我的表单值没有被发布。 onBeforeSubmit的Sencha touch 触摸表单忽略提交的值,sencha-touch,extjs,Sencha Touch,Extjs,我正在提交一个表单,但神奇的是我的表单值没有被发布。 onBeforeSubmit的onBeforeSubmit以预期的值触发,我甚至可以在这个.submit()之前执行this.getValues() TL;DR This提交到服务器,但我没有发布任何值,你知道为什么吗?根据方法的默认设置GET,应该在配置obj中将其更改为POST。(例如config.method='POST')然后出发 MyForm= function(config){ if ( typeof config !== 'ob
onBeforeSubmit
以预期的值触发,我甚至可以在这个.submit()之前执行this.getValues()
TL;DR This提交到服务器,但我没有发布任何值,你知道为什么吗?根据方法的默认设置GET
,应该在配置obj中将其更改为POST
。(例如config.method='POST'
)然后出发
MyForm= function(config){
if ( typeof config !== 'object' ) {
config.url='test.php';
// config.standardSubmit = true;
config.items= [{
xtype: 'fieldset',
title: 'Login Details',
instructions: 'Please enter the information above.',
defaults: {
required: true,'
},
items: [{
xtype: 'textfield',
name : 'username'
}, {
xtype: 'passwordfield',
name : 'password'
}]
}];
var tbarBottom = {
xtype: 'toolbar',
dock: 'bottom',
items: [{
text: 'Login',
ui: 'confirm',
handler: function() {
this.onLoginClick();
},
scope: this
}]
};
config.listeners= {
beforesubmit: function(formpanel, values, options) {
console.log(values);//yup they are there
},
scope:this
}
config.dockedItems= [tbarBottom];
MyForm.superclass.constructor.call(this,config);
};
Ext.extend( MyForm, Ext.form.FormPanel,{
onResetClick: function() {
this.reset()
},
onLoginClick: function() {
console.log(this.getValues());//yup they are there
this.submit()
}
});