Welcome to the LimeSurvey Community Forum

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

Prefilled answers based on Token

  • Carinaa
  • Carinaa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago #97010 by Carinaa
Prefilled answers based on Token was created by Carinaa
Hi there,

I just wanted to ask, if it is possible to prefill answers to questions based on tokens?

There is a list with all survey participants that also includes the departement for the most of them. For some members this information is missing.
When a member gets the token-based link and he starts the survey, the answer for the departement should already be filled in, when available in the previously mentioned list. If not or false entered the participant should be able to edit.

Does anyone has a hint on that?

Thank you,
jo3ran
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 9 months ago #97091 by tpartner
Replied by tpartner on topic Prefilled answers based on Token
You should be able to use a placeholder like {TOKEN:ATTRIBUTE_1} in the default answer setting.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Carinaa
  • Carinaa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago #97125 by Carinaa
Replied by Carinaa on topic Prefilled answers based on Token
Thank you, that might work but would not be automated as desired.
In that case I will have to create the tokens as a first step and evaluate all generated IDs manually, filling the answers as a second step, isn't it?

I would rather like to import (csv) the prefilled answers together with the list of participants or even from a second list.

Best,
jo3ran
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 9 months ago #97130 by tpartner
Replied by tpartner on topic Prefilled answers based on Token
In that case, you may be able to use parts of this workaround - manual.limesurvey.org/Workarounds:_Manip...ulate_several_fields

Particularly the $.get() and jQuery.csv() functions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Carinaa
  • Carinaa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 9 months ago - 10 years 9 months ago #97326 by Carinaa
Replied by Carinaa on topic Prefilled answers based on Token
Hi guys,

I did't want to make you wait a second longer ;)

It was easier as thought:
Just add the amount of additional attributes to your tokens, read them in via .csv or other import and then add as prefilled answer {TOKEN:Attribute_1} or whatever your desired attributes name is. Like tpartner was saying ;)

Regards and thanks a lot,
Jöran
Last edit: 10 years 9 months ago by Carinaa. Reason: Forgot to thank
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose