vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Load specific custom field in registration page? (https://vborg.vbsupport.ru/showthread.php?t=288048)

AFemaleProdigy 09-19-2012 09:30 PM

Load specific custom field in registration page?
 
Hello! Currently the default Register template uses {vb:raw customfields_option} to load all custom fields into the Register page. I want to load specific individual custom fields where I see fit on the Register page, instead of the ALL custom fields in one block. What is the vb raw code to load a single specific custom field for the new user to fill in?
Thanks!

Infinity101 09-19-2012 11:09 PM

Hello, I am unable to test this to ensure it works - however if you haven't tired already:

Reviewing register.php:
Code:

                if ($profilefield['required'] == 2)
                {
                        // not required to be filled in but still show
                        $profile_variable =& $customfields_other;
                }
                else // required to be filled in
                {
                        if ($profilefield['form'])
                        {
                                $profile_variable =& $customfields_option;
                        }
                        else
                        {
                                $profile_variable =& $customfields_profile;
                        }
                }

so in template I would try:
Code:

<vb:if condition="$profilefield[required] != 2">{vb:raw customfields_option}</vb:if>
Again, I'm not saying this is the answer. However it may give some ideas until someone can answer more thoroughly.

AFemaleProdigy 09-20-2012 02:52 AM

That didn't work for me. Any other ideas? Thanks, by the way. :)

Infinity101 09-20-2012 03:01 AM

The next idea would be to edit the register.php. In the same snippet of code, remove:

Code:

if ($profilefield['required'] == 2)
                {
                        // not required to be filled in but still show
                        $profile_variable =& $customfields_other;
                }

So instead it shows:

Code:

if ($profilefield['required'] != 2)
{
if ($profilefield['form'])
                        {
                                $profile_variable =& $customfields_option;
                        }
                        else
                        {
                                $profile_variable =& $customfields_profile;
                        }
}


AFemaleProdigy 09-20-2012 12:00 PM

Hmmm... unfortunately, there is nothing loading when I try your method. No errors, no fields, nothing. Also, I am not sure if it matters, but these fields I am trying to display are not required fields.

Infinity101 09-20-2012 06:23 PM

Oh I was believing they were required custom fields. Both of my snippets above were as if they were required during registration.

AFemaleProdigy 09-20-2012 08:42 PM

So, does anyone know how to help me?

AFemaleProdigy 09-29-2012 12:30 AM

Help? Anyone?


All times are GMT. The time now is 11:37 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.00991 seconds
  • Memory Usage 1,725KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete