short free text - autocomplete is not working

More
3 months 6 days ago #155834 by arunicbe
arunicbe created the topic: short free text - autocomplete is not working
I have a short free text. I would like to add autocomplete to this input. I have added the javascript code to template.js.

     $(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.
$('#answer321841X12X139').autocomplete({source: ["Test1","Test2","Test3"]});


Any help on how to fix this.

Please Log in to join the conversation.

More
3 months 6 days ago #155844 by arunicbe
arunicbe replied the topic: short free text - autocomplete is not working
I figured out. The document ready function was enclosed in another function mistakenly.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now