I'm using the JQuery autocomplete and it's working normally. But it is populating a type text that contains only one field (the txt itself) to fill in.
I would like a select to be filled in instead of txt.
Someone help me?
Follow the code
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Autocomplete - Default functionality</title>
<link rel="stylesheet" href="http:////code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="style.css">
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script><scriptsrc="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>
$(function() {
var clientes = [
"Fulano",
"Bertanbo"
];
$( "#clientes" ).autocomplete({
source: clientes
});
});
</script>
</head>
<body>
<div class="ui-widget">
<label for="clientes">clientes: </label>
<input id="clientes">
</div>
</body>
</html>
I would like to change the
<input id="clientes">
By
<select name="clienteEscolhido">
<option value=""></option>
</select>