1
我試圖渲染JSON形式多選擇2,但我不能選擇2與jsonform不工作
$('#resource-form').jsonForm({
schema: {
rest: {
type: 'object',
properties: {
template_id: {
type: "array",
items: {
type: "string",
}
}
}
}
}
}
form: [
{
type: "select",
key: "rest.template_id[]"
}
]
}
$("select[name='rest.template_id[]']").select2({
data: data,
multiple: true
})
選擇二做工非常精細,但如果我提交表單後端得到空template_id PARAM
{"rest"=>{"template_id"=>[]}}
我想我創建了不正確的模式和表單。你可以幫我嗎?