Skip Navigation

[Resolved] Hiding a row on a table if the Custom Field is empty

This support ticket is created 5 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Author
Posts
#1224266
IMG 1 - notes section screenshot.png

Hi I have a dropship directory website of wholesalers, dropship suppliers, etc.). I am looking to display specific contact details (phone #, address, website url, NOTES, etc.) of the company in each post. One of my rows has "Notes" about the Supplier. However, some suppliers don't have any notes in that section (see IMG 1 attachment). You will notice that row is just blank but the left column still says "Notes". Is there a way to hide that row completely when the suppliers don't have any notes?

I'm not sure if it has anything to do with the "Set condition(s)" (Conditional Display) of that field because that part confuses me. I'm having a hard time understanding "conditions" of a Custom Field when it comes to =, >, >=, ===, !> . All those symbols and the "value" and all of that is confusing to me. Anyways, I look forward to your reply. Thanks!

#1224289

Hello,

You can use [wpv-conditional] shortcode to check if the field value is empty, then display that row content, see our document:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/#2-comparing-the-element-with-an-empty-string

Checking fields and other elements for Empty/Non-empty Values

#1226160

My issue is resolved now. Thank you!