Check out the LimeSurvey source code on GitHub!

Automatic Answers / Prefilling

More
6 years 1 week ago #54993 by Cosmo
Hi,

I found several threads about this, but none were quite what i was looking for.

I want to create a question called e.g. "UserAttribute1" and I want LimeSurvey to hide this question from the user and automatically answer it with a certain value depending on the token that is being used to answer the survey.

This Wiki Entry looked promising, however I need the token-attributes to be inserted into the answer, not the question.

Please Log in to join the conversation.

More
6 years 6 days ago #55044 by tpartner
{TOKEN:ATTRIBUTE_1} is not directly accessable by JavaScript so how about this:

1) Use {TOKEN:ATTRIBUTE_1} to load the token value into the text or help section of the hidden question.

2) Use JavaScript to retrieve that value and load the answer accordingly.

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
6 years 6 days ago - 6 years 6 days ago #55056 by Cosmo
I'm not sure if using Javascript is asking for trouble here, since users can manipulate values themselves easily.

The reason why i need to automatically answer questions ist that I want to integrate Limesurvey into an existing system in which I have collected various user/usage data over the years.

Since Limesurvey can only filter answers (for the report/stats in the end) based on the answers of a survey I need a way to transport certain data from the existing system to a limesurvey answer.

What I have done now is to create a script that manually puts the data in to the survey-table, but this is not ideal since i have to manually create a new script for each survey.


It would be great if you could create a way to filter answers (in the final report) based on token attributes or would at least provide a way to prefill answers for users (on the serverside)
Last Edit: 6 years 6 days ago by Cosmo.

Please Log in to join the conversation.

More
6 years 6 days ago #55067 by tpartner
You can add a feature request - ideas.limesurvey.org/

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.

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