Welcome, Guest
Username: Password: Remember me

TOPIC: Specific predefined answers on specific users

Specific predefined answers on specific users 2 years 8 months ago #72579

  • IoSmith
  • IoSmith's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • Karma: 0
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...
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #72600

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
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.
Last Edit: 2 years 8 months ago by DenisChenu.
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #72610

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #72630

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
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
Last Edit: 2 years 8 months ago by DenisChenu. Reason: END URL, not email
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #73968

  • IoSmith
  • IoSmith's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • Karma: 0
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...
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #74004

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #74009

  • IoSmith
  • IoSmith's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • Karma: 0
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: 2 years 8 months ago by IoSmith.
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #74031

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
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
Last Edit: 2 years 8 months ago by DenisChenu.
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #74039

  • IoSmith
  • IoSmith's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 28
  • Karma: 0
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: 2 years 8 months ago by IoSmith.
The administrator has disabled public write access.

Re: Specific predefined answers on specific users 2 years 8 months ago #74048

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6435
  • Thank you received: 840
  • Karma: 249
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
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.625 seconds
Donation Image