Welcome, Guest
Username: Password: Remember me

TOPIC: Default Ansswer Value from User token

Default Ansswer Value from User token 2 years 9 months ago #68198

  • gel87
  • gel87's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Hello everybody,

i'm new with lime survey and have a first question. So we will ask at first the user of a surey if its username is correct. So my question is now can I set a default answer to a question based on the user details of a survey participant?

Thx and regards!
The administrator has disabled public write access.

Re: Default Ansswer Value from User token 2 years 9 months ago #68206

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
You can pre-fill an answer from thr URL - docs.limesurvey.org/tiki-index.php?page=...using_the_survey_URL

If using tokens, you can use JavaScript to pre-fill the answer with the token placeholder - www.limesurvey.org/en/forum/design-issue...efined-answers#66939
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.
Last Edit: 2 years 9 months ago by tpartner.
The administrator has disabled public write access.

Aw: Re: Default Ansswer Value from User token 2 years 9 months ago #68207

  • gel87
  • gel87's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Okay, thank you. The second answer is what need, but that's only possible with JavaScript? There is no add-on or included survey element?
The administrator has disabled public write access.

Re: Aw: Re: Default Ansswer Value from User token 2 years 9 months ago #68211

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
Unfortunately, as of version 1.91, there is no built-in capability to pre-load answers with token values.

Here are some instructions on how to use JavaScript in the survey - docs.limesurvey.org/Workarounds%3A+Manip..._etc._in_LimeSurvey_
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: Aw: Re: Default Ansswer Value from User token 2 years 9 months ago #68212

  • gel87
  • gel87's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
And in version 2?
The administrator has disabled public write access.

Re: Aw: Re: Aw: Re: Default Ansswer Value from User token 2 years 9 months ago #68222

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5302
  • Thank you received: 291
  • Karma: 247
Why don't you include the data from the token table at the question like "Hello <FIRSTNAME> <LASTNAME>! Our records show that your current address is:
<ATTRIBUTE_1>
<ATTRIBUTE_2>
<ATTRIBUTE_3>

If this is NOT correct, please correct the following entries:
a) First Name:
b) Last Name

c) Street
d) ZIP
e) City

If all is correct, just click next.

Keep in mind that storing survey answers at the token table is not possible yet but you could forward the user to a to be coded script at the end of the survey which reads out the data and updates the according token entries.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Aw: Re: Aw: Re: Default Ansswer Value from User token 1 year 9 months ago #87685

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5302
  • Thank you received: 291
  • Karma: 247
gel87 wrote:
And in version 2?
At Limesurvey 2 (and already at 1.92 as well), you can set default answers using the expression manager.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.132 seconds
Donation Image