News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Required Fields

Started by SpectroPro, October 21, 2004, 12:16:19 AM

Previous topic - Next topic

SpectroPro

Is there a way to require people to enter information into their profile?  At our board, we require people include a location and age.  How can we make it so if these fields are NOT used that they can't use the board until they are? 

Seems like if someone tries to post, it verifies that they CAN post (signed in, etc..)  So, can we have it somehow also check to see if certain fields are also filled out before it lets them post?

TIA
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

http://www.therealityrocks.com    http://forum.therealityrocks.com/trr
- Greg

CapriSkye

why not make some field required at sign up?
you might wanna read this topic
http://www.simplemachines.org/community/index.php?topic=11249.0

SpectroPro

Quote from: CapriSkye on October 21, 2004, 02:21:12 AM
why not make some field required at sign up?
you might wanna read this topic
http://www.simplemachines.org/community/index.php?topic=11249.0

That would be all good and fine.  Cept I have no clue how to do that either.  However, the problem with that is, that the user can then delete the info.  I would like it so they can NOT post unless they have filled out their location and display it.
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

http://www.therealityrocks.com    http://forum.therealityrocks.com/trr
- Greg

3fifty

Quote from: SpectroPro on October 21, 2004, 05:50:19 PM
I would like it so they can NOT post unless they have filled out their location and display it.

I have been trying to figure this out for awhile now.  Hope someone can help out with this.

Metho

Well, that's why you'd put two checks in. In register, you should be able to use that code in that link CapriSkye gave. http://www.simplemachines.org/community/index.php?topic=11249.msg137201#msg137201 is the actual message. Then, you'll also have to put in another check in Profile.php for those same fields. So, if they go into the profile, and try to delete the data, its not going to post. So effectively, they can't post without those fields filled in. Whether they're real or fake is a seperate issue, though.

A tutorial for the custom fields in Profile.php and Register.php is located at http://unknown.network32.net/tutorial.smf_custom-profile

Makes sense, yes? Require at registeration, and require on profile modification.

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

Advertisement: