【发布时间】:2014-12-18 00:07:43
【问题描述】:
我在 json 中收到以下值:
Alarm: "1"
Categories: ["P"]
Users: ["Alexander","Moritz"]
并将它们加载到一个表单中:
form.load({
method:"GET",
url:'GetSimpleProtocol.json'
})
表单域是:
{
type:'checkbox',
name:'Alarm',
boxLabel: 'Alarmieren',
inputValue: '1'
},{
xtype: 'combobox',
fieldLabel: 'Kategorie',
name: 'Categories',
store:['P'],
multiSelect: true,
},{
xtype: 'textareafield',
fieldLabel: 'Label',
name: 'Users'
}
当我直接提交时:
form.submit({
url:'SaveSimpleProtocol.json'
})
提交 POST 中的字段值已与第一个文件中的相反:
Alarm: true
Categories: [{field1:"P"}]
Users: "Alexander,Moritz"
我可以告诉我的组件或表单在提交之前将这些值更改回所需的格式吗?
【问题讨论】:
标签: javascript forms extjs