Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Transfer token value to second survey

  • DanielVN
  • DanielVN's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 10 months ago #169775 by DanielVN
Transfer token value to second survey was created by DanielVN
Hi All,

I have setup a survey with public registration that will serve as a survey collecting basic demografic information about the respondents. Once the respondent completes the first survey i would like to redirect them to a second survey where I will ask them additional questions. I don't want the surveys to be very long and this is the reason why i have split them.

Since the first survey is asigning random tokens to each respondents i would like to pass the token value to the second survey so I can match the data from both surveys.

Could you please advise if there is a way to do it?

Also is there a way to set the automaticallt generated tokens to have only numeric values instead of alpha-numeric as it is currently?

FYI I'm using limesurvey Version 2.73.0+171219
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #169781 by holch
Replied by holch on topic Transfer token value to second survey
How are the tokens created? By Limesurvey or by yourself?

If it is a Limesurvey token you can usually acess the token via {TOKEN}. Give it a try and post this in a question text, just to see if it works.

You can then use this to add the token to the end url for the second survey and use the panel integration feature to store the token that has been transmitted via the URL into a text question.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DanielVN
  • DanielVN's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 10 months ago #169787 by DanielVN
Replied by DanielVN on topic Transfer token value to second survey
Hi Holch,

Thank you very much for your answer.

The tokens are created automatically by Limesurvey once the respondent fills his email.

Actually i was using the same approach, but i have used small letters for {TOKEN} and this is the reason why it was not passing the value. Unfortunatelly the value is not stored in the open end. I have used this setup multiple times for other projects and it was working properly. I'm using the below redirect to redirect respondentsto the second survey and i have attached a screenshot of the panel integration setup that i have applied:

vnmarketresearch.eu/panel/index.php/3674...ang/bg&token1={TOKEN }



Could you please advise what could be the reason for this?

On the other hand do you have any idea regarding my second question: "Also is there a way to set the automaticallt generated tokens to have only numeric values instead of alpha-numeric as it is currently?"

The only thing that i found that can be changed regarding the tokens is the length.

Cheers
Daniel
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #169788 by holch
Replied by holch on topic Transfer token value to second survey
I don't think you can change the way the tokens are generated without hacking the core of LS.

No idea why it is not storing your token in the second survey. You might have hidden the question via the "always hide" feature. It might not work with this, but you might have to hide the question via CSS class. Give it a try, don't hide the question and see if your token appears and is saved to the database. Then hide via "Always hide" and via CSS and check what happens.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose