Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Limesurvey 5.2.12 autocomplete csv

1 year 1 month ago #224621 by djimas
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:

Hi , 

Someone I can explain me how to configure autocomplete in limesurvey release 5.2.12 ?

I followed this tutorial, is valid for this release 5.2.12 ? 


I put the javascript code in source the first question and the csv is load perfectly into javascript array  but autcomplete doesn't work: 

<link href="/upload/templates/test/template.css" rel="stylesheet" />
<script type="text/javascript" src="/upload/templates/test/jquery-ui-1.13.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="/upload/templates/test/jquery.csv.js"></script>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
        var qNameID = 16;
        var qIDID = 17;
        var qEmailID = 18;
        var url = "/upload/templates/test/names.csv";
        // Create an array to hold the names
        var namesArr = new Array();
        // Grab the CSV contents
            // Convert CSV contents to an array of arrays
            fullArray = $.csv.toArrays(data);
            // Load the names array
            $(fullArray).each(function(i, item){

            // Initialise the autocomplete plugin
            $('#question'+qNameID+' input.text').autocomplete({
                source: namesArr,
                // Event fired when a selection is made (ui.item.value refers to the selected item)
                select: function(event, ui) {
                    // Find the "ID" and "Email" values associated with the selected name value and load those questions
                    $(fullArray).each(function(i, item){
                        if(item[0] == ui.item.value) {
                            // The value from column 2 of the CSV
                            $('#question'+qIDID+' input.text').val(item[1]);
                            // The value from column 3 of the CSV
                            $('#question'+qEmailID+' input.text').val(item[2]);

thanks in advance,



Please Log in to join the conversation.

10 months 1 week ago #228309 by test_user_4
I am also trying to get this to work. How did you upload the jquery.csv.js plugin? I'm using LimeSurvey 3x. If I can get that loaded I'll see if I can get it to work.

Please Log in to join the conversation.

10 months 1 week ago #228323 by tpartner
If you don't have direct server access, you may be able to load it via CDN - cdnjs.com/libraries/jquery-csv

Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose