vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Prefilled Custom Profile Field??? (https://vborg.vbsupport.ru/showthread.php?t=42774)

leon2u 08-26-2002 07:00 PM

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!

g-force2k2 08-26-2002 09:10 PM

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:

$snumber "700-"

but its better off creating your own field because it would be tough to alter the updating of one profilefield...

then you should also maybe use expressions depending upon how close you want the number match to be... regards...

g-force2k2

Logician 08-27-2002 07:06 AM

After you took g-force's advice, this hack can help you to force your users enter numeric data for your field..

g-force2k2 08-27-2002 02:19 PM

lol... i didn't know you made such a hack Logician looks good though :)

regards...

g-force2k2

leon2u 08-27-2002 02:42 PM

to fill out the code for this in member.php?

And where can i fill out a default value for a custom field?

thanx

g-force2k2 08-27-2002 02:48 PM

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

leon2u 08-27-2002 02:59 PM

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?

Logician 08-27-2002 03:04 PM

Quote:

Originally posted by g-force2k2
lol... i didn't know you made such a hack Logician looks good though :)

small hack..one of my firsts.. :)

Quote:

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.
What about this idea? Since all serials need to start with "700-" why don't you add this info just left to form input field, instead of putting the info inside the form field.

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..

leon2u 08-27-2002 03:17 PM

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....

leon2u 08-27-2002 03:28 PM

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
  • Page Generation 0.01020 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete