Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

questionnaire with pre-filled answers from table

  • heeringa11
  • heeringa11's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206766 by heeringa11
Two years ago we conducted a questionnaire where participants gave their e-mail address. The results of this questionnaire are stored in an Excel table, including the e-mail addresses.

This year we conduct a questionnaire again, partially targeting the same participants as two years ago. Some of the questions are the same.

If the participant gives his/her e-mail address at the beginning of the survey, is it then possible right away to search for the participant in the table of two years ago using the e-mail address, and right away to prefill the questions that are the same as two years ago with the data from the table?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206769 by tpartner
In my opinion, yes, but it would take quite a bit of development using AJAX calls and the API for each question you want to prefill.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206770 by holch
No. Limesurvey can not search for that.

However, what you can do is the following: For those that participated last year, you can create a closed survey where you create a token table. In this token table you can include things from the previous survey as custom attributes. From within the survey you can load these custom attributes into the survey and use them as default answers, for example.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: tpartner
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206771 by holch
OK, I should say: No, not without custom coding. Of course Tpartner is right. With Ajax calls you could do it, but as he says, this will be probably quite a bit of work.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • heeringa11
  • heeringa11's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206855 by heeringa11
Replied by heeringa11 on topic questionnaire with pre-filled answers from table
Does the token table include the data of the participants, and can this table include the answers that the participants previously gave?

Do the participants receive a personal link?

If so, and if clicking on a personal link, is it then possible to get is so that the default answers for some questions are set to the answers previously given by the receiver of that link and that are found (and retrieved from) the token table?

Is a token table the same as a 'survey participants table'?
The topic has been locked.
  • heeringa11
  • heeringa11's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206860 by heeringa11
Replied by heeringa11 on topic questionnaire with pre-filled answers from table
I am not familiar with AJAX yet, just a little bit with JavaScript. Does this site:

manual.limesurvey.org/Workarounds:_Manip...wers_for_text_inputs

explain what you mean?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206865 by holch

Does the token table include the data of the participants, and can this table include the answers that the participants previously gave?

You need to create this data in the token table. There are some standard information that every token table requires (e.g. email, etc.) and then you can create custom attributes where you can save the responses that each respondent has given previously and then later in the survey access this date and pipe the answers into your survey.

Do the participants receive a personal link?

If you use token based surveys yes, then each respondent will have a personal link, connected to the data in the token table (as long as you do not set the survey to annonymous).

If so, and if clicking on a personal link, is it then possible to get is so that the default answers for some questions are set to the answers previously given by the receiver of that link and that are found (and retrieved from) the token table?

Yes, this is possible. At least it should be possible for most question types.

Is a token table the same as a 'survey participants table'?

Yes, either this has changed some time ago. We often call it token table to make sure it is clear that we are not talking about the results table, but I guess the official name is "survey participant table". ;-)
manual.limesurvey.org/survey_participants

The best way to work with the survey participant table is to create one respondent/participant manually with all the attributes you need and then export the file via CSV. This way you have a template and see how this needs to be formated. Then you can fill your CSV file with the participants and their data (e.g. the responses from the previous survey).

Within the questionnaire you will have to access the attributes in the token table.
manual.limesurvey.org/Survey_participants#Manage_attributes
manual.limesurvey.org/ExpressionScript_-...#Access_to_variables

So for the field "First Name" to appear in the survey you would need to use {TOKEN:FIRSTNAME}, if you want the value stored in the custom attribute 5 you will be able to do so via {TOKEN:ATTRIBUTE_5}.

E.g. in the last survey the respondent has given the answer "Dog" in Q1, which has the answer code "1". So you could store this previous answer as "1" in one of the attributes and then within the survey you should be able to set the default value of the same question in the new survey as "1" by reading the value from the token/survey participant data.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: heeringa11
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose