The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Prefilled Custom Profile Field???
Hai there,
I made an custom profile field which users need to fill out with a serialnumber. This is a required field!! All serials are starting with '700-' and need to be prefilled in the required Serial textbox field. So that users directly can enter the rest of their serial behin the '-' sign. How can I do this??? Thanx for your effort already! |
#2
|
|||
|
|||
just when you create the profilefield then give it a default value... but if you really want the serialnumber to be exact then you should use conentation(sp) and connect a variable that equals 700- ie:
in member.php PHP Code:
then you should also maybe use expressions depending upon how close you want the number match to be... regards... g-force2k2 |
#4
|
|||
|
|||
lol... i didn't know you made such a hack Logician looks good though
regards... g-force2k2 |
#5
|
|||
|
|||
to fill out the code for this in member.php?
And where can i fill out a default value for a custom field? thanx |
#6
|
|||
|
|||
well you can edit the field value in phpmyadmin and add a default value of 700- if you want but i would prefer using conentation because that way the 700- part cant' be edited and will always be inserted regards...
g-force2k2 |
#7
|
|||
|
|||
I cannot get it to work......sorry how do I have to do this...do i need to add a field in PHPAdmin called Value or so?
|
#8
|
||||
|
||||
Quote:
Quote:
What you are trying to do: Serial Number : [700-.........................] What I suggest: Serial Number : 700-[.........................] This will save you a lot of trouble like: a) inserting a default value to your field b) Checking if user sent the field with only data "700-" or entered some other numbers too c) More easily applying numeric required hack etc. If you like the idea holler and I (or g-force2k2) can tell how your will do it.. |
#9
|
|||
|
|||
Tell me how to do that, I found only this:
Template register_customfields this is where all data comes in from the customfields Template registeradult there stands this $customfields_required So here will come in my Serial....plz take a look @ my site www.inventorusers.nl and go to the registerpage to see the field! See snapshot also... Do not how to this from here.... |
#10
|
|||
|
|||
Well fixed the hack myself........cool......see snapshot!
Quite simple indeed! Created a custom template called register_customfields_kg and changed this code in register.php ORG-CODE: ------------------------------------------------------------------ eval("\$customfields_required .= \"".gettemplate("register_customfields")."\";") ; ------------------------------------------------------------------ NEW CODE: ------------------------------------------------------------------ eval("\$customfields_required .= \"".gettemplate("register_customfields_kg")."\";") ; ------------------------------------------------------------------ Well the solution you can see in the snapshot! I suppose this is what you mean? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|