Please help us help you and fill where relevant:
Your LimeSurvey version: 5.2.14+220214
[
Own server or LimeSurvey hosting: Own server
Survey theme/template: Fruity
==================
Hi,
I have a question group which consists set of 14 questions which are dropdown menus and where users can choose the right code. For instance, in A section I have text similar to "A01 Pain, Common / In many places". As you can imagine, it's time consuming to find the right one even the dropdown menus are categorized alphabetically.
What I'm to achieve is to have a simple text field on top all of these dropdown menus, where the
autofill would fetch data of all of these dropdown question ID's (or a datafile). So when the user starts typing two letters A0 or pain, the user will get an result where the "A01 Pain, Common / In many places" is surely one of the results.
So far I've tried using the manual [url]
www.limesurvey.org/manual/Workarounds:_M...tc..29_in_LimeSurvey
[/url] but it seems I'm not even able to get the autofill to print out basic example code.
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
var q1ID = 'QQ';
var states = "Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware, District of Columbia,Florida,Georgia,Hawaii,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky, Louisiana,Maine,Montana,Nebraska,Nevada,New Hampshire,New Jersey,New Mexico,New York, North Carolina,North Dakota,Ohio,Oklahoma,Oregon,Maryland,Massachusetts,Michigan, Minnesota,Mississippi,Missouri,Pennsylvania,Rhode Island,South Carolina,South Dakota, Tennessee,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming".split(',');
$('#question'+q1ID+' input.text').autocomplete({
source: states
});
});
</script>
So my question is:
1. Is the manual up to date for v. 5? For instance, it suggest to modify templates.css (Add the following styles to the end of your 'template.css' file) which cannot be found on the files. I've added the custom code to custom.css.
2. Which text field should I use when using autofill? Short free text?
3. Is there any live example script (except
jqueryui.com/autocomplete/
) that actually is running on Limesurvey?
4. How do fetch data from 14 drop down menus? Adding more vars to question ID's like var q1ID var q2ID and #question'+q1ID+'
+q2ID+' input.text'?
Javascript works as I'm getting the "Test!" -popup. I'm using newest Chrome and Edge.