>Hi, I'm using the autocomplete plugin, the one that is modification of
>Dylan Verheul's jQuery Autcomplete plug-in.
>It's working great but I need to disable it using any function, and I
>don't know how to do it.
>
>I've tried with unbind() ?¿ on the field but it's not working :(
>
>Any help?

Not sure which MOD you're using (there are several) but if your using the
one I wrote (located at Pengoworks.com) then there is no way to disable the
behavior in the current code base.

Some possible workarounds:

1) MOD the code to add this feature.

2) Move to the latest more official version at
http://dev.jquery.com/browser/trunk/plugins/autocomplete. This doesn't have
a disable feature yet, but you could use the setOptions() method and set the
minChars to a really high number (like 999999.) This code is heavily
refactored so you would need to re-write your current code.

3) Use the jQuery .remove() method to complete remove the input and replace
it with a new field.

4) Use 2 input elements in your form--one that has the autocomplete behavior
attached and one that does not. You can then hide/show the appropriate
fields. They should each have unique IDs, but the could have the same name.
As long as the hidden field's value is blank, you'll get the value from the
visible element.

-Dan

Reply via email to