Log in

View Full Version : How do i add fields in the registe.php


dxflw
02-19-2009, 01:52 PM
Hi want to add in the registration page 2 fields:

1) Where you live
2) When have you Born.

How do i that?

Thank you.

Marco van Herwaarden
02-19-2009, 01:57 PM
<a href="http://www.vbulletin.com/docs/html/profile" target="_blank">Custom Profile Fields</a>

vbplusme
02-19-2009, 02:01 PM
You can add custom field in the admincp for the registration form.

admincp>user profile field? add new user profile field

They are completely customizable, make them required for your registration form so they can't skip them.

You will see a drop down that you assign it to the registration form, make sure you select "Yes at registration and update time"

dxflw
02-19-2009, 03:30 PM
Thanks a llot both!

enci
02-27-2009, 08:13 PM
How do you then access the info in those custom fields in vbulletin and outside of vbulletin? For instance, I've added a custom single select radio button to opt-in to our newsletter. How would I know if a user has opted-in?

TIA!

Brandon Sheley
02-27-2009, 08:18 PM
How do you then access the info in those custom fields in vbulletin and outside of vbulletin? For instance, I've added a custom single select radio button to opt-in to our newsletter. How would I know if a user has opted-in?

TIA!

check their profile in the admincp?

enci
02-27-2009, 08:38 PM
No, I mean for the purposes of writing scripts. I figured out all your custom fields are located in the userfield table. So for example, I added a field (field10) which is a Yes or No field. If field is "Yes", then I want to know the users email address. So I'd use a query like this:

select email from userfield uf, user u where field6 = 'Yes' and u.userid = uf.userid;

Hope this helps someone else.