Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 Mandatory Fields
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

tveith
Starting Member

32 Posts

Posted - 04 June 2001 :  07:27:37  Show Profile
Hi all!

If I want to have additional fields as "Mandatory" fields during a customer registration, what is the best way to do this to ensure they enter the information I require?

This would be a nice MOD to have, to be able to change which fields are required and which are not required during registration.

Thanks!!

e3stone
Average Member

USA
885 Posts

Posted - 04 June 2001 :  07:39:50  Show Profile  Send e3stone an AOL message
in register.asp look for this code:

else
Err_Msg = ""

If strAutoLogon <> 1 then
if Request.Form("Name") = "" then
Err_Msg = Err_Msg & "<li>You must choose a UserName</li>"
end if

end if

'## Forum_SQL
strSql = "SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_NAME = '" & Trim(Request.Form("Name")) &"'"

set rs = my_Conn.Execute (strSql)

if rs.BOF and rs.EOF then
'## Do Nothing
else
Err_Msg = Err_Msg & "<li>UserName already in Use, Please Choose Another</li>"
end if
rs.close
set rs = nothing

if (Instr(Request.Form("Name"), ">") > 0 ) or (Instr(Request.Form("Name"), "<") > 0) then
Err_Msg = Err_Msg & "<li> > and < are not allowed in the UserName, Please Choose Another</li>"
end if

'## NT authentication no additional password needed
if strAuthType = "db" then
if Request.Form("Password") = "" then
Err_Msg = Err_Msg & "<li>You must choose a Password</li>"
end if
if Len(Request.Form("Password")) > 25 then
Err_Msg = Err_Msg & "<li>Your Password can not be greater than 25 characters</li>"
end if
if Request.Form("Password") <> Request.Form("Password2") then
Err_Msg = Err_Msg & "<li>Your Passwords didn't match.</li>"
end if
end if
'############# added to verify age #################
if strAuthType = "db" then
if request("birthday_month") = "" then
Err_Msg = Err_Msg & "<li>You must enter your birthday month</li>"
end if
if request("birthday_day") = "" then
Err_Msg = Err_Msg & "<li>You must enter your birthday day</li>"
end if
if request("birthday_year") = "" then
Err_Msg = Err_Msg & "<li>You must enter your birthday year</li>"
end if
if (request("birthday_month") <> "") and (request("birthday_day") <> "") and (request("birthday_year") <> "") then
birthday = request.form("birthday_month") & "/" & request.form("birthday_day") & "/" & request.form("birthday_year")
age = datediff("yyyy",birthday, now)
if age < 16 then
Err_Msg = Err_Msg & "<li>You must be 16 or older to become a member</li>"
end if
end if



end if
'###################################################

If strAutoLogon <> 1 then
if Request.Form("Email") = "" then
Err_Msg = Err_Msg & "<li>You Must give an email address</li>"
end if
if EmailField(Request.Form("Email")) = 0 then
Err_Msg = Err_Msg & "<li>You Must enter a valid email address</li>"
end if
end if

if (lcase(left(Request.Form("Homepage"), 7)) <> "http://") and (lcase(left(Request.Form("Homepage"), 8)) <> "https://") and (Request.Form("Homepage") <> "") then
Err_Msg = Err_Msg & "<li>You Must prefix your URL with <b>http://</b> or <b>https://</b></li>"
end if
if strAuthType = "nt" and ChkAccountReg = "true" then
Err_Msg = Err_Msg & "<li>NT User Account already registered.</li>"
end if

if strUniqueEmail = "1" then

'## Forum_SQL
strSql = "SELECT M_EMAIL FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_EMAIL = '" & Trim(Request.Form("Email")) &"'"

set rs = my_Conn.Execute (strSql)

if rs.BOF and rs.EOF then
'## Do Nothing
else
Err_Msg = Err_Msg & "<li>Email Address already in use, Please Choose Another</li>"
end if
rs.close
set rs = nothing
end if
if Len(Request.Form("Sig")) > 255 then
Err_Msg = Err_Msg & "<li>The signature can not be greater than 255 characters. "
Err_Msg = Err_Msg & "It now is <b>" & Len(Request.Form("Sig")) & "</b> characters long.</li>"
end if

The code in red is an example of what makes the field required. Just do an "if...then" on each field you want required.

You're right. This would be a good thing to have a mod for. Admin screen, etc.

<-- Eric -->


http://insidewaco.com/forum/home.asp
Go to Top of Page

e3stone
Average Member

USA
885 Posts

Posted - 04 June 2001 :  07:41:47  Show Profile  Send e3stone an AOL message
oh yeah, you also have to change a lot of stuff in pop_profile.asp

I could try to make a mod for this today. I was actually looking for something to do, otherwise I'd just be bored. I'll let you know if I'm able to get it done today.

<-- Eric -->


http://insidewaco.com/forum/home.asp
Go to Top of Page

tveith
Starting Member

32 Posts

Posted - 04 June 2001 :  08:04:18  Show Profile
quote:

oh yeah, you also have to change a lot of stuff in pop_profile.asp

I could try to make a mod for this today. I was actually looking for something to do, otherwise I'd just be bored. I'll let you know if I'm able to get it done today.

<-- Eric -->


http://insidewaco.com/forum/home.asp



That would be great, thanks for any help you can give me. There are several fields we MUST have for registration and this would be very useful to me!

Go to Top of Page

tveith
Starting Member

32 Posts

Posted - 07 June 2001 :  08:08:22  Show Profile
quote:

oh yeah, you also have to change a lot of stuff in pop_profile.asp

I could try to make a mod for this today. I was actually looking for something to do, otherwise I'd just be bored. I'll let you know if I'm able to get it done today.

<-- Eric -->


http://insidewaco.com/forum/home.asp



Any luck making this MOD? Thanks!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07