请您帮忙,如何使用 medoo 框架数据库自动填充 ajax + select2 以自动填充相同形式的另一个输入。这是我的ajax代码:
$('.matrix').select2({
ajax: {
url: "index.php",
dataType: 'json',
data: function (params,page) {
return {
q: params.term, // search term
qa: 'matrix'
};
},
processResults: function (data,params) {
return {
results: $.map(data, function(obj) {
return { id: obj.id, text: obj.text };
})
};
},
//cache: true,
},
minimumInputLength: 3,
placeholder: "<?php _e('Please Select'); ?>",
});
请您指教。