Default Ansswer Value from User token

More
6 years 1 month ago #68198 by gel87
gel87 created the topic: Default Ansswer Value from User token
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!

Please Log in to join the conversation.

More
6 years 1 month ago - 6 years 1 month ago #68206 by tpartner
tpartner replied the topic: Default Ansswer Value from User token
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.
Last Edit: 6 years 1 month ago by tpartner.

Please Log in to join the conversation.

More
6 years 1 month ago #68207 by gel87
gel87 replied the topic: Aw: Re: Default Ansswer Value from User token
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?

Please Log in to join the conversation.

More
6 years 1 month ago #68211 by tpartner
tpartner replied the topic: Aw: Re: Default Ansswer Value from User token
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.

Please Log in to join the conversation.

More
6 years 1 month ago #68212 by gel87
gel87 replied the topic: Aw: Re: Aw: Re: Default Ansswer Value from User token
And in version 2?

Please Log in to join the conversation.

More
6 years 1 month ago #68222 by Mazi
Mazi replied the topic: Aw: Re: Aw: Re: Default Ansswer Value from User token
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)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 1 month ago #87685 by Mazi
Mazi replied the topic: Aw: Re: Aw: Re: Default Ansswer Value from User token

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)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!