![]() |
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! |
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 |
After you took g-force's advice, this hack can help you to force your users enter numeric data for your field..
|
lol... i didn't know you made such a hack Logician looks good though :)
regards... g-force2k2 |
to fill out the code for this in member.php?
And where can i fill out a default value for a custom field? thanx |
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 |
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?
|
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.. |
1 Attachment(s)
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.... |
1 Attachment(s)
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? |
All times are GMT. The time now is 09:09 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|