【发布时间】:2013-10-04 02:22:36
【问题描述】:
我有一个窗口,里面有类似的项目
items:{
xtype:'form',
items: [{
xtype: 'numberfield',
fieldLabel: '1',
name: 'va[]'
},{
xtype: 'textfield',
fieldLabel: '2',
name: 'va[]'
},{
xtype: 'textfield',
fieldLabel: '3',
name: 'va[]'
}]
},
我使用加载表单将数据从服务器获取到我的表单
var form = win.down('form').getForm();
form.load({
url: 'load.php',
success:function(form, action){
win.show();
}
});
我的 json 看起来像
{"success":true,"data":{"va":["1","2","3"]}}
但加载成功后我的表单为空白(未设置值)
谢谢
【问题讨论】:
-
您将需要修改您的 json 并为字段提供不同的名称,请参阅this answer
-
@NandkumarTekale b/c 表单中的项目是动态的,如果我使用明确的名称,那么这很难管理:|。