0
jqueryオートコンプリートウィジェットを使用しています。ユーザが会社や他のデータに関連付けられた番号を入力し、そのデータが他のフィールドに入力されています。現在、ユーザーは番号を入力してから、他のフィールドのリストを選択して完了する必要があります。私の目標は、ユーザーがリストから番号を選択する必要がなくなり、代わりに番号を入力して検索ボタンを押すと、フィールドに値が入力されます。どうすればこれを達成できますか?ここでJquery Autocomplete - 入力時にオートコンプリート
は私のコードです:
$("#moveinbooth").autocomplete({
source: "/sites/schedule.php",
change: function (event, ui) {
if (!ui.item) {
//http://api.jqueryui.com/autocomplete/#event-change -
// The item selected from the menu, if any. Otherwise the property is null
//so clear the item for force selection
$("#moveinbooth").val("");
}
},
minLength: 0,
position: {
my: "center bottom",
at: "center top",
collision: "flip"
},
scroll: false,
select: function (event, ui) {
$(this).autocomplete('disable');
$('#exhibitorname').val(ui.item.exhibitor);
$('#moveindate').val(ui.item.moveindate);
$('#moveintime').val(ui.item.moveintime);
$('#moveoutdate').val(ui.item.moveoutdate);
$('#moveouttime').val(ui.item.moveouttime);
}
})