Jump to content

Custom fields


Imanol

Recommended Posts

Hello,

I want to add custom fields of pilots profile but they are not show. I have tried this code but it does not work:

<?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?>

However, I have used this one and it works but showing all the field values:

<?php
// Show the public fields
if($allfields)
{
foreach($allfields as $field)
{
echo "$field->value";
}
}
?>

I looked for help at this forum but I did not find a solution for this issue.

Thanks!

Link to comment
Share on other sites

Where exactly (what file?) do you want to put this in, and what is the exact name of your customfield?

The wrong variable might be declared.

Try this one

<?php echo PilotData::GetFieldValue($userinfo->pilotid, 'VATSIM ID'); ?>

It works perfectely, thank you!!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...