Here's a "quick and dirty" JavaScript solution... it's not fool-proof but it at least gives people the idea of what they are supposed to be typing in. You'll have to make two simple modifications to the html.pl file.
The modifications are below. It can be made a little more secure but that will involve a little more hacking.
I left in the "credits" (where I stole the base code from) so that you can see where to get some more ideas from.
##################### Step 1 add this to the <head></head> tags under html.pl in the subroutine html_signup_form
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original code by Peter Haydon -->
<!-- peter_haydon@lineone.net -->
<!-- Begin
function postit(){ //check call sign format is valid
test = document.form1.userid.value; size = test.length
while (test.slice(0,1) == " ") //Strip leading spaces
{test = test.substr(1,size-1);size = test.length
}
while(test.slice(size-1,size)== " ") //Strip trailing spaces
{test = test.substr(0,size-1);size = test.length
}
document.form1.userid.value = test; //write back to form field
if (size < 4 || size > 8){ //Code length rule
alert(test + " is not a valid call sign - wrong length");
form1.userid.select();
}
if (!(isNaN(test.charAt(0)))) { //leftmost character must be alpha rule
alert(test + " is not a valid call sign - must start with a letter");
form1.userid.select();
}
if ((!(isNaN(test.charAt(1)))) && (!(isNaN(test.charAt(2))))) { //leftmost character must be alpha rule
alert(test + " is not a valid call sign - positions 2 and 3 cannot both be numbers");
form1.userid.select();
}
if ((isNaN(test.charAt(1))) && (isNaN(test.charAt(2)))) { //leftmost character must be alpha rule
alert(test + " is not a valid call sign - positions 2 and 3 cannot both be alpha");
form1.userid.select();
}
if (!(isNaN(test.charAt(3)))){ //character in position 4 must be alpha rule
alert(test + " is not a valid call sign - position 4 cannot be a number");
form1.userid.select();
}
count1 = test.indexOf(" ");count2 = test.lastIndexOf(" ");
return true;
}
// End -->
</script>
######################### Step 2 replace this
<input type="TEXT" name="userid" value="$in{'userid'}">
######## with this
<input type="TEXT" name="userid" value="$in{'userid'}" onChange="postit()">
Watts: Apr 14, 2003, 2:42 PM