- Posts: 5
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
You can combine it with the survey ID....but if you have several survey it's not so unique.
Incorporate the SAVEDID as Ben suggests.Do you have a way of ensuring that it never repeats?
You can pad it with zeros depending on the length.The problem with the SAVEDID is it can be 1, 2, 3 (even more) digits
tpartner wrote: You can pad it with zeros depending on the length.
Depends on the PHP rand implementation. Is rand() in EM the php rand() function.Ben_V wrote:
(IMHO, with 200 participants, the probability of duplicate PIN outputs, may be the same than for of a sudden meteor shower on the server)Code:{if(!is_empty(PIN),PIN,substr(time()*rand() , 3 ,6))}