In previous versions we've used a customs script we got from u Sean, where the users enter a number and a password. The password is simply a conversion of the number (e.g 2 = p) but this has provided sufficient safety for us in that people never enter the wrong number by misstake.
Since 3.x we've used the option to have them enter twice. Unfourtuantley people somtimes enter the wrong number, and they still do it twice!
We would thus want to yet again use the custom script. I've tried uploadin the getsubjectnumber function in the create script wizard on your page but this does not work. Here is the script:
function GetSubjectNumber()
{
// This method prompts the subject for two numbers in order avoid mistyped numbers.
// The first is an id number. The second is a transformation of the id number.
// The method verifies the second is in fact the proper transformation of the first.
var intRegExp = /(^-?\d\d*$)/;
var promptMsg = "Skriv in det användarnummer du har fått av oss.";
var confirmMsg = "Skriv in det lösenord du har fått av oss. Tänk på att bara använda små bokstäver";
///var idLength = 7;
var snum = prompt(promptMsg, "");
while ( snum != null && (intRegExp.test(snum) == false) )
{
// if the input was invalid, prompt again
alert("Det nummer du skrev in, '" + snum + "', var inte det nummer du fått av oss.");
snum = prompt(promptMsg, "");
}
if ( snum == null )
{
return null;
}
var sconfirm = prompt(confirmMsg, "");
while ( sconfirm != null && (sconfirm != Transform(snum)) )
{
// if the input was invalid, prompt again
alert("Det lösenord du skrev in, '" + sconfirm + "', var inte det lösenord du fått av oss.");
sconfirm = prompt(confirmMsg, "");
}
if ( sconfirm == null )
{
return null;
}
return snum;
}
function Transform(snum)
{
var sconfirm = "xjp";
if ( snum != null )
{
for (var i=0; i < snum.length; i++)
{
switch( snum.charAt(i) )
{
case "1":
sconfirm += "c";
break;
case "2":
sconfirm += "r";
break;
case "3":
sconfirm += "e";
break;
case "4":
sconfirm += "a";
break;
case "5":
sconfirm += "t";
break;
case "6":
sconfirm += "i";
break;
case "7":
sconfirm += "o";
break;
case "8":
sconfirm += "n";
break;
case "9":
sconfirm += "b";
break;
case "0":
sconfirm += "g";
break;
}
}
}
return sconfirm;
}
Basicly we want this to work :) And we are in quite a hurry actually.