Check out the LimeSurvey source code on GitHub!

Specific predefined answers on specific users

More
5 years 4 weeks ago #72579 by IoSmith
Hello everyone. Here is my problem:
Lets say i have 2 users (u1, u2). They take a survey with specific token for each one (t1, t2). The survey has one question ("Your name").
We suppose that users answers are "u1" and "u2", respectively.
Next time they take another survey which has 2 questions ("Your name" and "Age").

What i want is a way that the time they gonna take the second survey (we suppose they have already asnwered the first survey) the question "Your name" is predefined according to their answer on the first survey (so they don't have to re-answer it).
Quite complicated...

Please Log in to join the conversation.

More
5 years 4 weeks ago - 5 years 4 weeks ago #72600 by DenisChenu
Hello,

The way i see it, there are surely another solution.

If your survey aren't anonymous.

Put a phpscript at the end of the first survey, this php script get the token, find the name in the first survey and fill the name on the token table of the second survey.

You can have some attribute for another thing.

Denis

PS: you can add a ajax php script too on the first page of the second survey too fill the same information maybe.

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).
Last Edit: 5 years 4 weeks ago by DenisChenu.

Please Log in to join the conversation.

More
5 years 4 weeks ago #72610 by Mazi
I would go the same way: At the end of survey 1, read out the user information by a to be coded script which gets the data set ID passed by URL. This script then creates a new entry at the token table of survey 2.
You can then edit the email template and pass the username by URL so that it will populate a question at that survey with the passed data. Such an URL can look like ...&12345X22X333={TOKEN:LASTNAME}.

More information about placeholders can be found at: docs.limesurvey.org/The+template+editor&...+LimeSurvey#Keywords

More information about populating an URL with predefined data is available at: docs.limesurvey.org/SGQA+identifier&stru...tions+for+LimeSurvey


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 4 weeks ago - 5 years 4 weeks ago #72630 by DenisChenu

Mazi wrote: More information about placeholders can be found at: docs.limesurvey.org/The+template+editor&...+LimeSurvey#Keywords

Hello,

I think with END URL placeholder, you can have directly use : Prefilling survey answers using the survey URL
?sid=1234&token={TOKEN:TOKEN}&SSSXGGGXQQQ={INSERTANS:SSSXGGGXQQQ}

Not sure for TOKEN:TOKEN :).

Denis

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).
Last Edit: 5 years 4 weeks ago by DenisChenu. Reason: END URL, not email

Please Log in to join the conversation.

More
5 years 1 week ago #73968 by IoSmith

Shnoulle wrote:

Mazi wrote: More information about placeholders can be found at: docs.limesurvey.org/The+template+editor&...+LimeSurvey#Keywords

Hello,

I think with END URL placeholder, you can have directly use : Prefilling survey answers using the survey URL
?sid=1234&token={TOKEN:TOKEN}&SSSXGGGXQQQ={INSERTANS:SSSXGGGXQQQ}

Not sure for TOKEN:TOKEN :).

Denis


You need TOKEN not TOKEN:TOKEN.
But i haven't made it to work. It says it can't recognize command INSERTANS...

Please Log in to join the conversation.

More
5 years 1 week ago #74004 by Mazi
Please quote the syntax you are trying to use.


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 week ago - 5 years 1 week ago #74009 by IoSmith

Shnoulle wrote:

?sid=1234&token={TOKEN:TOKEN}&SSSXGGGXQQQ={INSERTANS:SSSXGGGXQQQ}

Not sure for TOKEN:TOKEN :).

Denis


You need
?sid=1234&token={TOKEN}&SSSXGGGXQQQ={INSERTANS:SSSXGGGXQQQ}
Last Edit: 5 years 1 week ago by IoSmith.

Please Log in to join the conversation.

More
5 years 1 week ago - 5 years 1 week ago #74031 by DenisChenu
Here, it's the parameter

You have to put the url before .....
http://yoururl/index.php?sid=1234&token={TOKEN}&SSSXGGGXQQQ={INSERTANS:SSSXGGGXQQQ}

Not only ?sid ....

Oups, no ... ?sid work if you go to your own installation,

For example, i have "No matching survey" on ?sid=1234&token=&SSSXGGGXQQQ=3
?sid=1234&token={TOKEN}&SSSXGGGXQQQ={INSERTANS:SSSXGGGXQQQ}
But you can put your complete url.

What is your release version ?
Did you replave the SSSXGGGXQQQ with the good number ?

Denis

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).
Last Edit: 5 years 1 week ago by DenisChenu.

Please Log in to join the conversation.

More
5 years 1 week ago - 5 years 1 week ago #74039 by IoSmith

Shnoulle wrote: Here, it's the parameter

You have to put the url before .....

http://yoururl/index.php?sid=1234&token={TOKEN}&SSSXGGGXQQQ={INSERTANS:SSSXGGGXQQQ}


Of course i did.

Shnoulle wrote: What is your release version ?

I tried it with version 1.92RC3.

Shnoulle wrote: Did you replave the SSSXGGGXQQQ with the good number ?

Denis


Yes.
Anyway, the solution to my problem was given using vv files.
But the url way is very interesting when you want to pass via url (automatic way compared to the vv files) specific information from previous survey(s).
Last Edit: 5 years 1 week ago by IoSmith.

Please Log in to join the conversation.

More
5 years 1 week ago #74048 by DenisChenu

IoSmith wrote: I tried it with version 1.92RC3.

:whistle:

1.92RC3 are in developpement, not-stable .....

Please use 1.91 in production, and use bug report for 1.92.

Thanks

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).

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form