Prefilling Survey Using Methods Other Than URL

More
3 years 5 months ago #118823 by bkane
bkane created the topic: Prefilling Survey Using Methods Other Than URL
I need to prefill a survey with answers for up to 50 questions (mostly numeric or short text) which will be hidden from the user, for example, ans1, ans2... ans50.

The survey will require a token as well.

Prefilled answers will be accessed by other survey questions in javascript functions using {qcode.shown} expression, i.e. {ans1.shown}.

I am able to get this to work by passing the survey answers in the URL, but due to the large number of parameters needed, the potential for people editing the URL, etc., I was hoping to use
a query to update the LimeSurvey table (lime_survey_sid).

While I was successful at doing this using the token value, it appears that the answers are not available to my javascript function using either {qcode.shown} or {qcode.NAOK} despite allowing multiple responses in token settings.

I suspect that the survey is not pulling answers from the lime_survey_sid table at start-up, but I was wondering if there was a way to force this?

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #118826 by holch
holch replied the topic: Prefilling Survey Using Methods Other Than URL
Why don't you write this data in custom attributes of the token table? You can access those from within the survey, you can export them together with the survey results and they are hidden from the user.

As you require tokens anyway, this is the cleanest solution.

You can access these values with something like {TOKEN:ATTRIBUTE_1}, {TOKEN:ATTRIBUTE_2} etc.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: bkane

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #118827 by bkane
bkane replied the topic: Prefilling Survey Using Methods Other Than URL
Brilliant idea! I can't wait to try it. Many thanks for pointing me in the right direction.

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #118828 by holch
holch replied the topic: Prefilling Survey Using Methods Other Than URL
It works pretty well. For a Telephone survey I pipe information about the respondents into the survey and the interviewers can basically see the first name, last name, company name, sector code, address, telephone numbers etc.

All this information is stored in the token table and comes from a list that is either purchased from list providers or from the list of customers that our client provides us. Works fine.

You only need to set it up. Once it works and is tested you can create the token table in excel and upload it as CSV.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!