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);
}
})