Skip Navigation

[Resolved] How can I prevent content blocks relating to empty fields from displaying?

This support ticket is created 3 years, 5 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 – 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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by alexanderS-11 3 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1851165

Tell us what you are trying to do?
The site I'm working on has Post types with a lot of different fields. Often the editors have to leave some blank because some info isn't available or not every post type comes with images and videos, others do. When displaying the single posts in the front end, each field has a headline. Sadly, I was not able to find an option to define a headline in the field block, instead I had to make a headline block and then display the field below. The result is, that the headlines are always present, even if the field below has no value and doesn't get displayed. That's bad UX and I'd like to find out how I can only display headlines, if the field below has a value. I hope you can help me with this.

Is there any documentation that you are following?
I haven't found any documentation on this.

Is there a similar example that we can see?
I think it's very common on websites to not display headlines for empty fields.

What is the link to your site?
hidden link

#1851227

Shane
Supporter

Languages: English (English )

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

Hi Alexander,

Thank you for getting in touch.

Based on this it seems you will need to use the conditional block to check if the field is empty.
https://toolset.com/course-lesson/using-toolset-conditional-block/

Please follow the documentation in the link above and let me know if it helps.
Thanks,
Shane

#1853715

Hey Shane,
thank you very much, the conditional block is a very powerful tool I had not discovered yet.
This will definitely help me achieve what I want.

However, if I may give that as a feedback:
My intuitive expectation was to find a settings option to give the displayed custom field a name/heading and to set a check for "hide when value is empty". I think this would be far more intuitive and quick.

I totally understand using the the conditional block as well, but maybe my expectation still has some value for you guys ands gals as a UX feedback.

Thanks again and kind regards,
Alex

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.