Dropdown autocomplete doesn't narrow results

klox7 16 Mar, 2018
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
Max_admin 16 Mar, 2018
Hi klox7,

it all depends on your database query doing the search, how do you have the "Read data" action setup ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
klox7 18 Mar, 2018
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
klox7 22 Mar, 2018
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 23 Mar, 2018
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.
klox7 23 Mar, 2018
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.
gix.vax 26 Apr, 2018
can you post the entire solution to autocomplete?
This topic is locked and no more replies can be posted.