Welcome, Guest
Username: Password: Remember me

TOPIC: Automatic Answers / Prefilling

Automatic Answers / Prefilling 3 years 9 months ago #54993

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

Re: Automatic Answers / Prefilling 3 years 9 months ago #55044

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
{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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Aw: Re: Automatic Answers / Prefilling 3 years 9 months ago #55056

  • Cosmo
  • Cosmo's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
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: 3 years 9 months ago by Cosmo.
The administrator has disabled public write access.

Re: Aw: Re: Automatic Answers / Prefilling 3 years 9 months ago #55067

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.091 seconds
Donation Image