Hide field on List Page if field is NULL (Custom Template)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
costeeta
User
Posts: 6

Hide field on List Page if field is NULL (Custom Template)

Post by costeeta »

I would like to display a field on the list page only if that field is NOT NULL. How do I write that IF statement in CustomTemplateBody?

This is the code I have in CustomTemplateBody
<tr{{{row_attrs}}}>
<td><img src="facebook.png"> {{{facebook}}}
<img src="twitter.png">{{{twitter}}}
<img src="linkedin.png">{{{linkedin}}}</td>
</tr>

I want to display those images and fields only when the field is not not null.


Webmaster
User
Posts: 9430

Post by Webmaster »

Use Row_Rendered server event (see Server Events and Client Scripts in the help file) to add your image to ViewValue conditionally.


Post Reply