Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

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

Autocomplete a question from csv and fill two more question from same CSV 3 years 1 month ago #97147

  • xsiyez
  • xsiyez's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
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:
The administrator has disabled public write access.

Autocomplete a question from csv and fill two more question from same CSV 3 years 1 month ago #97160

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6134
  • Thank you received: 1363
  • Karma: 535
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.
Last Edit: 3 years 1 month ago by tpartner.
The administrator has disabled public write access.

Autocomplete a question from csv and fill two more question from same CSV 3 years 1 month ago #97167

  • xsiyez
  • xsiyez's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 18
  • Karma: 0
Thanks a lot Tony!
It has worked. And thanks for the other hints you included in the js file!

Alex
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.211 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form