Support

  1. peacetree
  2. Support
  3. Monday, May 13 2019, 09:18 AM
In a previous post I wanted to show fields in a custom module in case there is a value.
You adviced me how to do this with css (ones again thanks for that).

From the documentation I figure I can only show field values.
Is there a way to display also the title of the field in case there is a value?
Accepted Answer
admin Accepted Answer
Admin
Hi,
unfortunately this is not possible natively but there are a couple of workarounds:
1) Uses HTML delimiter field type to show field (name+value)
- Create a HTML field type with text like this:
Gender: {user gender displayed}

- Set condition on "Gender" field type like: if equal to custom value (leave empty) hide Gender delimiter field
- Now you can choose to show the delimiter field in your list, the HTML delimiter contain also fieldname and it will be displayed only when Gender is not empty.

2) You can use some free plugin like Sourcerer (https://www.regularlabs.com/extensions/sourcerer) to get show in a HTML Delimiter field type a PHP code, for example you can put a code like this:
{source}
<?php
global $JSNLIST_DISPLAYED_ID;
if($JSNLIST_DISPLAYED_ID) $owner_id=$JSNLIST_DISPLAYED_ID;
else $owner_id=JRequest::getVar( 'id' , JFactory::getUser()->id );
$value = JsnHelper::getUser($owner_id)->getField('gender');
if($value) echo 'Gender: ' . $value;
?>
{/source}
  1. more than a month ago
  2. Support
  3. # Permalink


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.