I have a question type, but I have no idea does it can work on LimeSurvey.
How to create a custom PIN number on End Message or in the question, each respondents will see their own unique PIN number. 100 respondents will have 100 unique PIN number.
it's the coupon PIN
every one will have specify PIN number
they can use this PIN number to buy something.
as the Respondents finish the survey, they can will see their own PIN number on the END PAGE or in next page.
e.g.
Respondent A will see this PIN number : G12A35
Respondent B will see this PIN number : Z1553w
Respondent C will see this PIN number : O82aw7
I'm looking to do the exact same thing - we use multiple systems, and want to generate a not-immediately-predictable PIN to be entered into our other programmes to ensure participant records aren't mixed up.
RitaShen - I would be interested to hear if you are successful with this.
If respondent get the URL with a token, you can create the PIN as an additional attribute and assign a unpredictable PIN to every token.
Since the PIN should be check in other systems, when respondents enter them, you can work with precreated PINs.
Hi,.
If there is a predefined list of numbers, you may use an ajax call to select one.
I am not sure if I provided an example a few weeks ago.
Anyway, I will do it on Thursday when I am back home.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
In my database I created a table "voucher" with three fields:
1. id (autoincrement)
2. vouchercode (varchar(20))
3. status (Tinyint) This as flag, if the code was already used
And now the php file "getCode.php"
(only as example, depends on your way of connecting and library (mysqli, PDO, ...)
1. Connect to the database
2. query the table:
"SELECT vouchercode from voucher WHERE status=0 limit 1" (So you get always only one row with the first not used vouchercode)
3, Save the vouchercode to $myCode=
4. Update the table; set the status of this vouchercode to "used" =1)
"UPDATE voucher SET status=1 WHERE vouchercode=$myCode";
5. echo the vouchercode
echo $myCode;
which is really the next one in the database.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless