- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Question with autofill function gets cut off when saving
- mcole
- Topic Author
- Offline
- New Member
Less
More
6 years 5 months ago - 6 years 5 months ago #160466
by mcole
Question with autofill function gets cut off when saving was created by mcole
I created a question that has a simple piece of code in to autofill while a user is typing an answer.
When I go to save the question it gets cut off right in the middle of the code.
Now to be clear - there are around 10,000 names in that list. I read somewhere the question cannot be too long, so I am thinking there is an expression manager problem, but how do I find a problem in a csv that is 10,000 columns?
Any ideas would be greatly appreciated.
I am attaching a text file with the question in it, in case you want to see the whole thing
Thank you
Code:
Choose your Top Doctors - Select up to three (3) per specialty<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var qID = 168; $('#question'+qID+' input[type="text"]').autocomplete({ minLength: 2, // This line is optional, signifies number of keystrokes before autocomplete is initiated source: [ "a doctor","b doctor","c doctor","etc" ] }); }); </script>
When I go to save the question it gets cut off right in the middle of the code.
Now to be clear - there are around 10,000 names in that list. I read somewhere the question cannot be too long, so I am thinking there is an expression manager problem, but how do I find a problem in a csv that is 10,000 columns?
Any ideas would be greatly appreciated.
I am attaching a text file with the question in it, in case you want to see the whole thing
Thank you
Attachments:
Last edit: 6 years 5 months ago by mcole. Reason: simple edit to make the question easier to read
The topic has been locked.
- mcole
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
6 years 5 months ago #160788
by mcole
Replied by mcole on topic Question with autofill function gets cut off when saving
So anyone looking for autofill with a large list here is how to do it:
The easiest way would be to take the default template and create a copy of it.
Then put the list of doctors into the template js file.
There you may register a global variable and call it as the source for your survey.
A link to how I did it!
www.limesurvey.org/forum/installation-a-...e-not-working#160769
The easiest way would be to take the default template and create a copy of it.
Then put the list of doctors into the template js file.
There you may register a global variable and call it as the source for your survey.
A link to how I did it!
www.limesurvey.org/forum/installation-a-...e-not-working#160769
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12882
- Thank you received: 3965
6 years 5 months ago #160790
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Question with autofill function gets cut off when saving
Hi, mcole,
thank you for sharing your ideas and solutions.
But in the manual there are several ways to do this.
read the options from a fixed array
read them from a csv-file
read them from a MySql database.
manual.limesurvey.org/Workarounds:_Manip...r_LimeSurvey_2.05.2B
Best regards
Joffm
thank you for sharing your ideas and solutions.
But in the manual there are several ways to do this.
read the options from a fixed array
read them from a csv-file
read them from a MySql database.
manual.limesurvey.org/Workarounds:_Manip...r_LimeSurvey_2.05.2B
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.