Imanol Posted October 13, 2016 Report Share Posted October 13, 2016 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! Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted October 13, 2016 Members Report Share Posted October 13, 2016 if you echo $pilot->pilotid do you get any result ? Quote Link to comment Share on other sites More sharing options...
web541 Posted October 13, 2016 Report Share Posted October 13, 2016 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'); ?> Quote Link to comment Share on other sites More sharing options...
Imanol Posted October 13, 2016 Author Report Share Posted October 13, 2016 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!!! Quote Link to comment Share on other sites More sharing options...
Imanol Posted October 13, 2016 Author Report Share Posted October 13, 2016 Just another question. Do you know how I can set it as an input area. I want my pilots to edit their profile field values form the edit profile option. Thanks. Quote Link to comment Share on other sites More sharing options...
web541 Posted October 14, 2016 Report Share Posted October 14, 2016 It's a customfield so it should automatically show up in the profile/edit section of your website. Go to http://yourvaurl.com/index.php/profile/edit And it should already be there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.