Author Topic: sign up form  (Read 1668 times)

sanj

  • Posts: 54
    • View Profile
sign up form
« on: June 18, 2007, 08:39:16 am »
hi,

how do I get subscriber to enter at least 3 characters for fname and lname on the sign up form?

thanks
sanj
Magnetic Therapy Natural Pain Relief for Arthritis, Back Pain and More... at http://www.worldofmagnets.co.uk

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
sign up form
« Reply #1 on: June 18, 2007, 03:03:34 pm »
SanJ,

You can use JavaScript, ie:

Code: [Select]
<form method=post action=/listmail/signup.php>
<input type=hidden name=list value=1>
First <input type=text name=fname id=fname><br>
Last <input type=text name=lname id=lname><br>
Email <input type=text name=email><br>
<input type=submit value=Subscribe! onclick="
if(document.getElementById('fname').value.length<=3){
 alert('Please enter a first name longer than 3 characters.');
 return false;
}
if(document.getElementById('lname').value.length<=3){
 alert('Please enter a last name longer than 3 characters.');
 return false;
}
">
</form>
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting