Jump to content

Displaying values from custom profile fields

Featured Replies

Posted

How can I get to the users custom profile fields from this: $comment->author()->

I want to check the value of a specific field ID to display something. I tried doing it in the customFieldsDisplay template, but the value there comes with some html... not just the text of the field.

  • 1 month later...
  • Author

Bump...

  • Author

Maybe, what I want to do is the following:

I have a select box custom field with many options. I want to check which option has been chosen by the user, and depending on that, display something, for instance an image like you did for your military members.

Here's what I did for the insignias, in the display format box for the profile:

<span class='row_title'>{title}:</span><span class='row_data'>  {content}<br><img src='http://www.wheelhorseforum.com/public/{content}.png'></span>

  • Author
2 minutes ago, nylyon said:

Here's what I did for the insignias, in the display format box for the profile:

<span class='row_title'>{title}:</span><span class='row_data'>  {content}<br><img src='http://www.wheelhorseforum.com/public/{content}.png'></span>

I feel so stupid now, didn't even think about the fact that we can use {content} in an url...

Spoiler

facepalm.jpg

Thanks.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.