5
有没有办法创建具有多个输入元素的自定义字段?我正在咨询documentation,创建单个输入元素非常简单,但我不确定如何添加多个元素。在自定义编辑类型字段中添加多个输入元素
有没有人过过这座桥?如果是这样,你是怎么做到的?
下面是一些示例代码:
...
{name: 'Dimensions', index: 'Dimensions', hidden: true, editable: true,
edittype: 'custom', editoptions: {custom_element: dimensionsElement,
custom_value: dimensionsValue}, editrules: {edithidden: true}},
...
function dimensionsElement(value, options) {
var el = document.createElement("input");
el.type = "text";
el.value = value;
return el;
}
function dimensionsValue(elem) {
return $(elem).val();
}