Use variables (eg. username) in survey

More
3 weeks 1 day ago #174660 by holch
holch replied the topic: Use variables (eg. username) in survey
I have read all of it but it was still not clear what you are trying to do, especially seeing what you are doing.

Once a survey has been submitted, you can't reopen it and edit responses afaik. I think here is the problem.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #174661 by holch
holch replied the topic: Use variables (eg. username) in survey

Or better: read the first 3-4 posts of this topic to understand what I mean ;)

And by the way: I don't appreciate the attitude. We are trying to help here, you should help us to help you. Therefore: I am out.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #174664 by DenisChenu
DenisChenu replied the topic: Use variables (eg. username) in survey

juppix wrote: Thanks! But the input field is empty :-(
Please take a look at the screenhot (attachment).

I nreally don't understand what you want to do …

And here kontactinfo_SQ001 … but since its a default value … it don't work. Just put {TOKEN:ATTRIBUTE_8} like you done after …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #174668 by juppix
juppix replied the topic: Use variables (eg. username) in survey
I have to apologize for being rude. That was definitely not my vote. My English is not that good.

I have a personallized survey.

Each user gets an email with his own token for the survey.
Now he can fill out the survey and push "submit".
It is possible without problems for the user to open the survey again (re-open with the same token): now he is able to modify (edit) his answers.
This works fine.

Now I want to integrate that the user gets "prefilled" answers if he opens the survey FIRST time. These answers should come out of the limesurvey-users-database (e.g. "{TOKEN:ATTRIBUTE_6}").
This also works fine.
But I just want this behaviour only the FIRST time the survey opens. If the users open the survey 2nd,3rd,... time the "old" (user added) anwers shoud appear.

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #174672 by DenisChenu
DenisChenu replied the topic: Use variables (eg. username) in survey

juppix wrote: I…
But I just want this behaviour only the FIRST time the survey opens. If the users open the survey 2nd,3rd,... time the "old" (user added) anwers shoud appear.

It's EXACTLY the prupose of default value …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago - 3 weeks 1 day ago #174674 by holch
holch replied the topic: Use variables (eg. username) in survey

I have to apologize for being rude. That was definitely not my vote.

Already forgotten. ;-)

It is possible without problems for the user to open the survey again (re-open with the same token): now he is able to modify (edit) his answers.

You are right, with "Enable token-based response persistence:" and "Allow multiple responses or update responses with one token:" set to "ON" this should be possible.

Thinking about it, this should work. You check if empty, which on the first opening should be the case. Then LS should fill the question with the value from the token. If the respondent opens again, there should be a value, so it should not be empty, so then it should use the very same value.

But I think the "." is wrong. I think subquestions are referenced like this (with underscore), if I am not totally wrong.
questioncode_subquestioncode

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last Edit: 3 weeks 1 day ago by holch.

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #174681 by tpartner
tpartner replied the topic: Use variables (eg. username) in survey
As Denis points out, default answers should be used for this. If the question is empty and ONLY IF the question is empty, the default answer will be inserted, otherwise no automatic change is made to the question value.

Have you tried default answers?




Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #174683 by holch
holch replied the topic: Use variables (eg. username) in survey
The screenshot he shows is from the default answer values ("Antwort-Vorgabewerte" in German), so I guess he is trying this already.
The error must be somewhere else. But as we do not have example LSS, it is difficult.

My guess is still that it is because of the underscore he is using in his test (see screenshot).

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #174684 by tpartner
tpartner replied the topic: Use variables (eg. username) in survey
Yes, but there is absolutely no reason to use if(is_empty(xx)...

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: holch

Please Log in or Create an account to join the conversation.

More
3 weeks 1 day ago #174687 by holch
holch replied the topic: Use variables (eg. username) in survey

Yes, but there is absolutely no reason to use if(is_empty(xx)...

Now I get it! Thanks!

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!