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 / Classic ASP versions(v3.4.XX)
 Required Fields
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

cassie
Starting Member

USA
9 Posts

Posted - 03 January 2006 :  15:27:38  Show Profile  Visit cassie's Homepage
Is there any way I can make the First Name and Surname required fields when new users register?

I went into the code and added the asterisk, but I don't want them to be able to submit the form until they have put something in these fields.

Any thoughts? Is there a mod for this?

Ranko
Junior Member

400 Posts

Posted - 03 January 2006 :  17:00:27  Show Profile
Searching the archives is good, and makes the mods happy. Computer is your friend.
Go to Top of Page

endomorph
Junior Member

United Kingdom
128 Posts

Posted - 06 January 2006 :  02:13:42  Show Profile
Cassie,

In register.asp, look for -


if trim(Request.Form("Country")) = "" then
				Err_Msg = Err_Msg &  "<li>You must select a country</li>"
			end if


After this, enter -


if trim(Request.Form("FirstName")) = "" then
				Err_Msg = Err_Msg &  "<li>You must enter a first name</li>"
			end if

if trim(Request.Form("LastName")) = "" then
				Err_Msg = Err_Msg &  "<li>You must enter a last name</li>"
			end if



The same applies to any other fields you want as required.

Need help with your Snitz ? Most Snitz & ASP custom coding undertaken. Email for info | Search Engine Optimisation
Go to Top of Page

nmstough
Starting Member

7 Posts

Posted - 13 January 2006 :  16:04:21  Show Profile
I must be missing something but I did a search and I dont see anything about the Country field being required in register.asp. Also, where in this file can one add the asterisk (*) to the table where the form fields are located?
Go to Top of Page

505_medic
New Member

USA
54 Posts

Posted - 13 January 2006 :  17:55:48  Show Profile  Visit 505_medic's Homepage  Send 505_medic an AOL message
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=59513&SearchTerms=Required,Fields

I turned this up with a relatively simple search. Don't forget to edit Pop Profile as well!!
Jon

http://www.silent-knights.com/forums
Mods Utilized: Active Users 4.0, Customized Icons, Customized Ranks, Private Messaging, Split Topics, IP Search, Custom Policy, Custom FAQ
Go to Top of Page

secretsquirrel
New Member

Australia
81 Posts

Posted - 20 June 2007 :  20:45:22  Show Profile  Visit secretsquirrel's Homepage
I would like to try and add a twist to this.
As a security measure for my forum is there any way to stop someone editing the first and last name fields once they have been submitted? I want these only accessible to admin and they will be hidden fields not shown in profiles.

Anyone who says a square peg does not fit into a circular hole has never seen a crazy bítch with a hammer
Go to Top of Page

secretsquirrel
New Member

Australia
81 Posts

Posted - 21 June 2007 :  05:17:38  Show Profile  Visit secretsquirrel's Homepage
Well i have searched and played with code all day, learning more as i go but i'm still not getting the required result.
I have renamed fields, changed the order of them and made fields required etc BUT i cant work out the rest. All attempts have failed when i check the profiles.
I would like to make Real Name and phone number only visible to admin, mods and the actual user. They are all required fields except phone number until i have worked out how to hide it.
Once this info is in place i also want to lock those fields so they can only be edited by Admin. I'm probably asking alot combining the 2?
I found a thread here where Shaggy points out the changes to hide fields but when i do a test one my fields are not hidden at all even when viewing a profile with a non admin account.
I tried hiding occupation as a test by doing the following but it didn't work.

if strOccupation = "1" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Occupation: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input type=""hidden"" name=""Occupation"" size=""25"" maxLength=""255"" value="""
if strMode <> "Register" then Response.Write(ChkString(rs("M_OCCUPATION"), "display"))
Response.Write """></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

Anyone who says a square peg does not fit into a circular hole has never seen a crazy bítch with a hammer
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 June 2007 :  06:04:30  Show Profile  Send ruirib a Yahoo! Message
To hide the field you should use:


if strOccupation="1" and mlev > 3 then


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

secretsquirrel
New Member

Australia
81 Posts

Posted - 21 June 2007 :  07:50:54  Show Profile  Visit secretsquirrel's Homepage
I must be doing something wrong somewhere or is there something othewr than inc_profile i have to edit?
This is the code just to work it out on occupation and it's not working.

if strOccupation = "1" and mlev > 3 then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Occupation: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Occupation"" size=""25"" maxLength=""255"" value="""
if strMode <> "Register" then Response.Write(ChkString(rs("M_OCCUPATION"), "display"))
Response.Write """></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

Anyone who says a square peg does not fit into a circular hole has never seen a crazy bítch with a hammer
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 June 2007 :  07:52:12  Show Profile  Send ruirib a Yahoo! Message
There's more than one place in inc_profile where you need to do it. Just do a search for strOccupation, once you've opened the file.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

secretsquirrel
New Member

Australia
81 Posts

Posted - 21 June 2007 :  08:26:03  Show Profile  Visit secretsquirrel's Homepage
I did a search but i only have 1 place with it.
I have placed that code in
if strFullName = "1" and mlev > 3 then
and
if strCity = "1" and mlev > 3 then
as these are the 2 main ones i want to hide. The city field is going to be phone number once the hidden field is working.
Both these strFullName and strCity only return 1 search result each in inc_profile and this is on 3.4.06

Anyone who says a square peg does not fit into a circular hole has never seen a crazy bítch with a hammer
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 June 2007 :  08:33:26  Show Profile  Send ruirib a Yahoo! Message
Yeah, I just checked too, my mistake, sorry.
Anyway, that (mlev > 3) test should hide the fields for all members but admins.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

secretsquirrel
New Member

Australia
81 Posts

Posted - 21 June 2007 :  08:48:19  Show Profile  Visit secretsquirrel's Homepage
hmmmmm dont know whats going wrong then. Had other members check too and it hasnt changed anything.

Anyone who says a square peg does not fit into a circular hole has never seen a crazy bítch with a hammer
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 June 2007 :  09:03:06  Show Profile  Send ruirib a Yahoo! Message
Can you post a link to a text version of your inc_profile.asp?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

secretsquirrel
New Member

Australia
81 Posts

Posted - 21 June 2007 :  09:18:34  Show Profile  Visit secretsquirrel's Homepage
Thanks for your help with this

http://www.aussiecoins.net/inc_profile.txt

Anyone who says a square peg does not fit into a circular hole has never seen a crazy bítch with a hammer
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 21 June 2007 :  09:46:53  Show Profile  Send ruirib a Yahoo! Message
Sorry for misleading you, you need to edit pop_profile.asp, not inc_profile.asp.
For fullname, the line should look like this:

			if strFullName = "1" and mlev > 3 and (Trim(rs("M_FIRSTNAME")) <> "" or Trim(rs("M_LASTNAME")) <> "" ) then


Just add the red part and it should fix it. It's a similar change for City.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 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.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07