- Posts: 24
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var qID = 32597; var states = "State1,State2".split(','); $('#question'+qID+' input.text').autocomplete({source: states}); }); </script>Name your state:
You would place Denis' function in template.js or in the question source. Then you would apply the function to the question by placing this in the question source:Also, where would I use your ls-selectfilter?
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { selectFilterDualScale({QID}); }); </script>
$('.array-flexible-duel-scale .dropdown-item select').each(function(i) { if($('option[selected="selected"]', this).length == 0) { $(this).prepend('<option value="">Please choose...</option>'); $(this).val(''); } });
Thanks Tony,tpartner wrote: Nice work Denis. We should add that to the workarounds.
The only problem I can see is that the width of the cloned select is set to that of the original and if the row is hidden by filtering the original has no width.But here there are a problem with first system if question is hidden at start...
$("#"+idNewSelectFilter).width($("#"+idSelectFilter).width());