Hide values from tooltip template if no data is present

I am displaying some user profile information in the tooltip template but it appears that the user profile property fields appear even if the user has no data for that particular field. For example, I am displaying the 'About me' profile field. If a user has not entererd any 'About me' data, I don't want the 'About me' field to appear.
I'm using HTML mode so that I can add text to indicate which user profile property field is being shown, and for example, the 'About me' part of the HTML is as follows:

About me: {{AboutMe}}

Is there a way to use JavaScript to hide this div if there is no data present?

Hi all,

I have worked this out using the excellend Plumsail documentation.
Using the 'if block helper' did the trick. The HTML for the 'About us' field should be added as this:

{{#if AboutMe}} About me: {{AboutMe}} {{/if}}

Just thought I'd post this in case it helps others in similar scenarios.

1 Like

Thank you, Joe! Sharing always helps sooner or later. =)