PDA

View Full Version : Load specific custom field in registration page?


AFemaleProdigy
09-19-2012, 09:30 PM
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:

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

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

So instead it shows:


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?