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"=>[]}}
我想我创建了不正确的模式和表单。你可以帮我吗?