I've enjoyed using LimeSurvey for some time, but this is my first post to the forum.

In a short text question, I want my users to be able to preview results based on their first couple of keystrokes, using jQuery autocomplete. I've already achieved this using a string or a .csv file as source for the autocomplete, but what I really want is to get the data from a MySQL table.

I actually have a working example of autocomplete using MySQL in a subfolder of my survey template, but for some reason I can't make this work in the survey itself. Since I know the autocomplete script is working (I can check this by replacing source), and the database connection should be fine (it's the same as in my test) I wonder if there may be some specific limitation to MySQL lookups within LimeSurvey? Either that, or I'm simply overlooking something.

Allright, I found the obvious... Turns out the autocomplete.php file was referenced incorrectly once the autocomplete script was moved into the survey question. Using the full url resolved this.

Even with the instructions presented in
the manual's workaround section
, it has taken me some effort to tweak the scripts to my use, and incorporate autocomplete into my survey. Hopefully, the scripts I have presented here may be of use to someone else

It would be great if you could add this to the workaround section as well. The Limesurvey manual is a wiki, anyone can contribute. Unfortunately the forums get "cleaned up" from time to time, which means solutions posted only here can get lost over time.

Well, I'm not an expert, either, so I wrote it the way I would have liked to read it. Very often you find yourself trying to combine suggestions from a variety of different sources, which makes debugging very difficult (especially when you're combining several coding languages and don't really feel confident with any of them...). Having scripts at hand that have already been tested, in a similar system as the one you're working in, definitely helps