Jump to content

Recommended Posts

Posted

Hello everyone,

I have added a custom field and I want to show it in profile_main.tpl,

What is it that I can put to it is shown,

This is the table that will do custom field

<td align="left"><strong>Aircraft:</strong></td>
<td align="left">here, i want to what has been entered in the custom field</td>

  • Administrators
Posted

Add something like

$this->set('allfields', PilotData::GetFieldData($pilotid, false));

to your controller replacing the $pilotid with whatever is relevant for that controller and then in your template use the "allfields" variable to show the fields you want.

Posted

I apologize for the inconvenience,

But what is it, how to used by the variable ($allfields) when bearing on the page.

Is this true?

<?php echo $allfields->Aircraft; ?>

with this controller:

$this->set('allfields', PilotData::GetFieldData($userinfo, false));

*Note: the Custom Fields name: Aircraft

  • Administrators
Posted

I think that I may be mis-understanding what you are trying to do. Is this a custom field added to the pilot profile through the phpvms admin panel, or is this a field you have manually added to another database table?

Posted

No,

i added a custom field control panel administration,

and now i want to show in the profile page of the pilot.

Using the previous orders of course.

  • Administrators
Posted

Then yes, this should get you the field from your database. Just make sure the name is the same as you have set in the table. In your example you have "Aircraft", if it is "aircraft" in your table then you probably not going to see it, you will probably get an error that the variable is undefined.

<?php echo $allfields->Aircraft; ?>

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