I have a problem with the autocomplete – it works only for the first text field.
$(function(){
var all_analysts = [<TMPL_VAR ALL_ANALYSTS>];
$('.aucomplete').autocomplete({
deferRequestBy: 0, //miliseconds
noCache: false, //default is false, set to true to disable caching
// callback function:
//onSelect: function(value, data){ alert('You selected: ' + value + ', ' + data); },////////////add a check if the name exists
// local autosugest options:
lookup: all_analysts //local lookup values
});
});
* contains the months (JANUARY, FEBRUARY, MARCH…).
Two text fields:
<input type="text" name="q1" class="aucomplete" value="hello" />
<input type="text" name="q2" class="aucomplete" value="hello" />
The fiest text field (q1) works fine but the secod (q2) doesn’t suggest/complete.
please note that when loading/refreshing the page it adds autocomplete=”off” to the first text field:
<input type="text" name="q1" class="aucomplete" value="hello" autocomplete="off"/>
<input type="text" name="q2" class="aucomplete" value="hello" />
I’m using the devbridge module.
Do you know what is the problem?
Thanks!
This is my jQueryUI variant, check the fiddle at http://jsfiddle.net/BWCpj/
lookupis not an option in the jQuery UI autocomplete; it should besource. For the rest of the options you can check the documentation athttp://jqueryui.com/demos/autocomplete/