Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: profile fields by id


Horoshiy
Participant

@horoshiy

Maybe I should be more concrete. My main task is to get profile fields structured inside the profile page. I need to place fields in 3 columns and in right order. So let’s imagine that we have 9 fields: Login, email, password, First Name, Last Name, Middle Name, Country, City, Address, Place of birth, Date of birth. I need to place Login, E-mail and Password in the first column in the page, First name, Last name and Middle name in the second column and Country, City, Address, Place of birth and Date of birth in the third column.
So i have field id’s which i can place in my profile page.

Should i do it like this?


echo '

';
$field = new BP_XProfile_Field( '1' );
$field_name = $field->name;
$field_value = $field->value;
echo '

' . $field_name . ': ' . $field_value . '

';

$field = new BP_XProfile_Field( '2' );
$field_name = $field->name;
$field_value = $field->value;
echo '

' . $field_name . ': ' . $field_value . '

';

$field = new BP_XProfile_Field( '3' );
$field_name = $field->name;
$field_value = $field->value;
echo '

' . $field_name . ': ' . $field_value . '';

echo '

';
/* and so on */

am I right?

Skip to toolbar