- Posts: 36
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
need to show a tracking code in end message to the participant
- hmd_bakhshi
- Topic Author
- Offline
- Junior Member
I'm using ls3 in surveys with anonymous participants. but sometimes they argue that they fill and submit the survey but I do not receive at server. I need a unic tracking code which show at end message to the participants.
does ls3 have such this code (like seed) by which I can use it at the end message? and how can I use it
thanks
- Joffm
- Offline
- LimeSurvey Community Team
- Posts: 13010
- Thank you received: 4002
well, you can create a random number by "{rand(100000,999999)"}
Or you create an alphanumeric string with six (or seven, or eight,...)random numbers (0,25) to get characters.
Like:
{join(substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1),substr('ABCDEFGHIJKLMNOPQRSTUVWXYZ',rand(0,25),1))}
In your end message just pipe this value.
Of course, you cannot be sure that all calculated values are unique.
But if you code is long enough it will do it.
Best regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11683
- Thank you received: 2748
However, this also means if they get back to you with this ID, the survey is not anonymous anymore, because now you can connect their responses to their person.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- jelo
- Offline
- Platinum Member
- Posts: 5033
- Thank you received: 1257
I don't recommend the SAVEDID as an PIN. Easily to guess, easily to mistype. If the respondent is actively seeking the confirmation of submission and don't want to reveal the data, just choosing a savedid below the own would be enough.holch wrote: Why not just use the SAVEDID? This is a truly unique number and it let's you easily identify the responses in the database.
Depending on the survey topic an easily guessable PIN can cause a lot of trouble.
I would e.g. add three random characters to the SAVEDID to prevent easy guessing.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11683
- Thank you received: 2748
Easily to guess, easily to mistype.
Not sure how someone will guess the SAVEDID. Usually the users don't have access to the SAVEDID. If you show it to them only at the end of the survey, where is the harm? How should they guess it? Not sure if I understand you wrong.
But I agree, it is probably better to add some random numbers at the beginning or the end, just to be save.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- jelo
- Offline
- Platinum Member
- Posts: 5033
- Thank you received: 1257
holch wrote: Not sure how someone will guess the SAVEDID. Usually the users don't have access to the SAVEDID. If you show it to them only at the end of the survey, where is the harm?
I don't know the scenario and the impact a wrong number can have.
But when you complete the survey, you get the SAVEDID displayed.
Since it is a anonymous survey, you can fill out the survey once again. You get a SAVEDID again.
The pattern of +1 increments is easily recognized.
Depending on the reason you need to prove participation via the SAVEDID, it might be wise to not use SAVEDID.
Beside malicious intention sloppiness is a good reason to not use SAVEDID for participants. They might just note or remember the SAVEDID wrong. With an increasing number the chance for mismatch is quite high.
Perhaps LimeSurvey can provide another seedvariable for such a purpose out of the box.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11683
- Thank you received: 2748
Maybe a combination of Joffm's solution and the SAVEDID might make sense. But you need to make sure to save this generated code into a question. Otherwise it is of no use.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13684
- Thank you received: 2497
Easi way to do it in plugin using secure.php.net/manual/fr/function.uniqid.phpjelo wrote: Perhaps LimeSurvey can provide another seedvariable for such a purpose out of the box.
in an hidden short text question
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
- jelo
- Offline
- Platinum Member
- Posts: 5033
- Thank you received: 1257
An option "expose_php_function", where you could define the php function and the ExpressionScript function name (often identical, but to prevent name collisions in the future).
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13684
- Thank you received: 2497
Not needed herejelo wrote: To expose these php functions to ExpressionScript would be a step forward.
An option "expose_php_function", where you could define the php function and the ExpressionScript function name (often identical, but to prevent name collisions in the future).
But : github.com/LimeSurvey/LimeSurvey/pull/1081
We CAN NOT expose whole php function, because
1. It can be dangerous
2. We need same function in javascript and php
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 , plugin development .
I don't answer to private message.
- tammo
- Offline
- Official LimeSurvey Partner
- Posts: 967
- Thank you received: 220
this looks like a "poor man's token creator". But since there is already a token mechanism, could that be used. Like filling a hidden text question with a generated token. That could also help with follow up research...
Tammo
Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
- jelo
- Offline
- Platinum Member
- Posts: 5033
- Thank you received: 1257
That's why I proposed a positive list and not a complete exposition.DenisChenu wrote: We CAN NOT expose whole php function, because
1. It can be dangerous
The Javascript support is a valid point.
On the other hand. ExpressionScript stayed unchanged for years. Seems to be no problem for most users. The others learn PHP or choose a survey tool with complete scripting support.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users