Extjs使用带有GetFieldValue的单选按钮

Extjs使用带有GetFieldValue的单选按钮,extjs,Extjs,我提交单选按钮值时遇到问题。我有两个单选按钮设置如下: { xtype: 'radio', fieldLabel: 'Employment Type', boxLabel: 'Documented', name: 'employment_type', checked: true, inputValue: 'documented' }, { xtype: 'radio', boxLabel: 'Contracted', name: 'employment_type', inputValue: 'c

我提交单选按钮值时遇到问题。我有两个单选按钮设置如下:

{
xtype: 'radio',
fieldLabel: 'Employment Type',
boxLabel: 'Documented',
name: 'employment_type',
checked: true,
inputValue: 'documented'
},
{
xtype: 'radio',
boxLabel: 'Contracted',
name: 'employment_type',
inputValue: 'contracted'
}
我使用AJAX调用以这种方式提交表单

var myParams = { 
employee: form.getFieldValues()
}   

Ext.Ajax.request({
url: '/employees',
jsonData: myParams,
success: function(result, request){
...
在服务器控制台中,我看到如下所示传递的参数,这是错误的

"employment_type"=>[false, true]
我希望如何传递参数:

"employment_type"=>"documented"
使用
form.getForm().getValues()
而不是
form.getFieldValues()
,如下所示:


但另一方面,为什么不通过调用
form.getForm().submit()
并让Ext.form.BasicForm处理所有数据收集来提交呢?

这很有效,谢谢,我在myParams中设置了一些其他参数,而不是使用Ext.form.BasicForm,因为使用2个参数时JSON会出现格式问题。