Check out the LimeSurvey source code on GitHub!

Prefill answers from csv file

More
5 years 2 months ago #69987 by nrichster123
Hello, I would like to pre fill the answers to a series of questions from information contained in a csv file. The survey is an open survey that does not use tokens. Is there any way to do this?
Thanks.

Please Log in to join the conversation.

More
5 years 2 months ago #69992 by tpartner
You can use AJAX and/or the js-tables ( code.google.com/p/js-tables/CSV ) plugin to import the CSV data. The details of a script to handle the imported data would depend on your question types and CSV contents.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 2 months ago #69994 by nrichster123
Thanks. The question types are all array text questions. The csv is comprised of 5 columns with no header. The leftmost column contains the data that is used to define the reference point for the other columns. For example (column 1 and 4 data is surrounded by quotes):

"row1",row1info1,row1info2,row1info3,"row1info4"
"row2",row1info1,row1info2,row1info3,"row1info4"
"row3",row1info1,row1info2,row1info3,"row1info4"
"row4",row1info1,row1info2,row1info3,"row1info4"

A modification to the Edit Text Elements page enables us to generate a csv file containing the above content. We need to be able to read that content back into survey responses.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form