Helpful Information
 
 
Category: vBulletin 3 Discussion
default value in register.php

I added a custom user profile field. What I need is for it to have a default value like the "http://" in the homepage area. Since this is a custom user profile field I can't find anywhere that I can set a default value for the input box when a user registers...

I have the "field5" added to the userfield table in the database with a set default value. Problem is when I do that it changes everyone's value in their edit profile. But when a new user signs up it just shows up blank when you go to edit profile...

The area on the register page is the

"Optional Information All information will be viewable by other team forum members."

area. So basically it would be like setting a default value for "biography". Not the one I want to have a default value but it's in the same area of custom user profile fields.

Thanks in advance...

you can edit the field5 value in phpmyadmin and set a default value or you can just drop field5 and readd it using a default value... regards...

g-force2k2

Actually I'm using (I think) your avatar as link hack ;) I have the default value set to { images folder}/no_img.gif But, I think what is happening is there is a field when a user signs up. The avatar field. For some reason it is blank and when the user signs up it shoots the blank field over and then it's blank in their edit profile.


I followed the instructions you wrote and it works like a charm, except when I get a new user. I'm using 2.26 by the way. Thanks in advance.

Actually I found a way around it. I just went into registeradult, removed the $customfields line.

Then just manually added in an area for the avatar with a default value of my default image path and a name of field5. The bio, occupation does not show up during registration but that's no biggie. It still shows up in Edit Profile. And now when a user signs up it will shoot over the field5 entry and no more broken images as avatars.

Thanks again. If you have a better solution let me know but this one seems to work for now. Thanks again...

** edited **
Hmmm, just found the profilefield in the database with field 5. I think the problem is that there is no default value set in that area. I'm a MySql newb pretty much. Is there a way to just give field 5 a "default" value. That way it should fix the problem without having to hack the templates like I did

Hi guys...

I am wondering the same thing... how do you set a default value for a custom user profile field?

Thanks,

Khashyar










privacy (GDPR)