Autocomplete a question from csv and fill two more question from same CSV

More
4 years 3 months ago #97147 by xsiyez
xsiyez replied the topic: Autocomplete a question from csv and fill two more question from same CSV
Please find attached the test survey with other relevant files attached. Kindly change the csv url in the javascript attached to question 1_0 source.
Attachments:

Please Log in to join the conversation.

More
4 years 3 months ago - 4 years 3 months ago #97160 by tpartner
tpartner replied the topic: Autocomplete a question from csv and fill two more question from same CSV
Ah, I get it now.

You are using a new version of jquery.csv.js, so this:
fullArray = jQuery.csv()(data);
Needs to be changed to this:
fullArray = $.csv.toArrays(data);


Here is an updated version of your survey with the following changes:
- The script is now in the source of 1_2
- Added a snippet to automatically detect the questions and their text inputs (questions must be sequential)
- The script automatically looks for the CSV file in the template directory

Attachment limesurvey_survey_6928591.lss not found


And here is a template with your CSV file and jquery.csv.js in it.

Attachment test_csv.zip not found


Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last Edit: 4 years 3 months ago by tpartner.

Please Log in to join the conversation.

More
4 years 3 months ago #97167 by xsiyez
xsiyez replied the topic: Autocomplete a question from csv and fill two more question from same CSV
Thanks a lot Tony!
It has worked. And thanks for the other hints you included in the js file!

Alex

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now