Skip Navigation

[Resolved] Conditional display of fields based on content or empty

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wants to check if a field is empty.
Solution:
This is actually possible and I would recommend taking a look at the link below for more information.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/

This support ticket is created 6 years, 11 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Marina Joseph 6 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#609475

Tell us what you are trying to do?

Is it possible to use shortcodes to conditionally display a field or not based on if the field is empty or has any content? I know how to do this in php, but the template I'm working on was set up using layouts, and I'd like to avoid rebuilding it as a php template. I have seen the conditional display feature, but have not figured out what condition to put here. It looks like you can only make them dependent on other fields' values.

#609527

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marina,

Thank you for contacting our support forum.

This is actually possible and I would recommend taking a look at the link below for more information.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/

Thanks,
Shane

#610731

thanks that documentation looks great.