将对象序列化为表单数据

时间:2017-08-11 06:37:54

标签: extjs

我正在尝试使用以下表单数据提交请求:

playdate: 2017-08-06
players[1][name]: Alex
players[1][username]: Alex
players[1][score]: 51

但是,如果我添加这样的玩家对象:

var players = grid.getSelectionModel().getSelection().map(function(record) {
    return record.getData();
});
form.submit({
    url:'log.php' 
    params: {
        players: players
    }
});

然后ExtJS像这样提交:

playdate: 2017-08-06
players: [object Object]

ExtJS不支持为表单urlencoded请求序列化对象吗?

Relevant fiddle

0 个答案:

没有答案