- Posts: 153
- Thank you received: 8
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ var qID = {QID}; var surveyRoot = location.pathname.split('index.php')[0]; var url = surveyRoot+"upload/themes/survey/extends1_bootswatch/gemeindenamen_liste{Q1}.csv"; // Create an array to hold the data var province= new Array(); // Grab the CSV contents $.get(url,function(data){ // Convert CSV contents to an array of arrays fullArray = $.csv.toArrays(data); // Load the data array $(fullArray).each(function(i, item){ province.push(item[0]); }); // Initialise the autocomplete plugin $('#question'+qID+' input[type="text"]').autocomplete({ source: province }); }); }); </script>
Use a short text question for autocomplete with a csv file, allowing filter by expression manager
Good idea,KompetenzZ wrote: Is it possible to add an instruction text to this question? Normally there is such a text beneath the question. See picture.