2

I have installed LimeSurvey 3.4 and tried to add this code to my question:

<script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
        $('#question{QID} input[type="text"]').autocomplete({
            minLength: 2,
            source: ["Test1","Test2","Test3"]
        });
    });
</script>

but autocomplete is not working and I have this error in Console:

TypeError: $('input.text', thisQuestion).autocomplete is not a function. (In '$('input.text', thisQuestion).autocomplete({
        minLength: 2,
        source: ["Test1","Test2","Test3"]
    })', '$('input.text', thisQuestion).autocomplete' is undefined)

In the workarounds it says that "Note that the Autocomplete widget is already included in LimeSurvey, as part of jQuery UI." so I was expecting autocomplete to work by default.

Should I need to add anything to my installation?

Another possibility is that LS 3.5 has changed the way to refer to the question, and that is what causes the JS error... any hint more than welcome!

NOTE: I have posted this question on the LimeSurvey forum but got no reply so far.

user299791
  • 2,021
  • 3
  • 31
  • 57

0 Answers0