Forums

Autocomplete select showing query code

nry22 11 Sep, 2017
Hi,

I had the auto completer feature on a dropdown in a Chronoforms V6 form working fine following your example form (selecting the data from Setup > auto > Read data).

However it is now showing lots of db query code in the results if non-matching data is entered:

function () {return h}
function () Array() { [native code] }
function (b,a){Array.forEach(this,b,a);return.this}

(and lots more.....)

I think this happened when I joined a second table - so the Read data is reading from two tables. Did I do something wrong, or is this function not meant to work with two tables?

If matching data is entered, it returns correctly, with just the matching results and no extra code.

Many thanks,

Nicholas.
nry22 11 Sep, 2017
Answer
Ok - don't worry, figured out a solution - I moved the custom code with "{var/jsonen:read_dataX}" into the "mysql data found" section. I had it after the read data, so it was returning regardless of what the database query result was.
This topic is locked and no more replies can be posted.