Welcome to the LimeSurvey Community Forum

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

short free text - autocomplete is not working

  • arunicbe
  • arunicbe's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago #155834 by arunicbe
I have a short free text. I would like to add autocomplete to this input. I have added the javascript code to template.js.

Code:
     $(document).ready(function()
    {
 
        $('#answer321841X12X139').autocomplete({source: ["Test1","Test2","Test3"]});
    });


The input field is not showing the autocomplete dropdown. There is no error in the console.

If I run this code, in the console log. The autocomplete display correctly.
Code:
$('#answer321841X12X139').autocomplete({source: ["Test1","Test2","Test3"]});


Any help on how to fix this.
The topic has been locked.
  • arunicbe
  • arunicbe's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago #155844 by arunicbe
Replied by arunicbe on topic short free text - autocomplete is not working
I figured out. The document ready function was enclosed in another function mistakenly.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose