Buy Now
Sign in

Dropdown autocomplete doesn't narrow results

klox7 , March 16 at 14:29
K
klox7
Hello,
I use dropdown field with DB Read to populate dropdown with items in db table. Field shows ok, when I start typing in field there are item shown in dropdown but they don't get filtered (narrowed) down. Instead a full list of values is shown. How can I achieve that if I write "go" only results like "golf", "letgo", "going" will be shown.
Regards
admin
Hi klox7,
it all depends on your database query doing the search, how do you have the "Read data" action setup ?
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
K
klox7
Hi, I have this settings:
Model name: Record
Database: selected table
Where conditions:
Record.title/LIKE:%{data:autocompleteresort_car_cf}%​
​Record.type_id:1​
​Record.published:1
Order fields: Record.title/name
Select type: Return an array of key/value pairs, two fields must be provided.
Fields to retrieve: Record.title
Then I use {var:read_data8} in field options to get values from db.
This works. I get desired values from db.
The only thing that's not working is when I start typing in input it doesn't show results based on what I type. It still shows all results.
Regards
K
klox7
Hi, I managed to get it working now, autocomplete works, but when I start typing 2nd word (with space in between) I get this in dropdown:
function() {return h}
function Array)() {[native code]}
etc.
This also happens in demo form Auto Completer.
Is this a bug or am I doing something wrong.
Regards
Gatsman
I had the same issue too in my site. (did not need a space between, it looked like it would happen if no results came up)
Then i made a test in a new Joomla installation with the demo form and could not recreate the problem.
It has to be some conflict with another extension or with the template (i saw no errors in developer tools - console)
I replaced the autocomplete with a custom one but you should check with the default template.
K
klox7
I think conflict with plugin or theme is not a problem.
But you are right what you said about no results. Space doesn't matter. If there are no results or if results have special characters like č, š,... than this behaviour occurs.
G
gix.vax
can you post the entire solution to autocomplete?