Skip Navigation

[Resolved] Display dynamic data only if the field has data

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

Problem: I would like to use a conditional block to display a custom field only if the field contains some value.

Solution: See the screenshot for example conditional criteria that tests for a non-empty field value.
non-empty custom field conditional criteria

Relevant Documentation:
https://toolset.com/course-lesson/using-toolset-conditional-block/

This support ticket is created 2 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by nadavL 2 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#2039561

Hi,
I'm trying to display a customer data field but set a condition since it might be empty.
I tried using the Conditional block but I think I'm missing something since I don't see how to enter if condition.

The goal is to enter a 'Fields and Text' block inside the 'Condional' block. If there's no data in that field, I don't want to display that block.

Please see the condition I've added in the attached image and advise what I've done wrong.
The URL with these blocks is: hidden link

Thanks

#2040009

Hi, I'm not able to see an attachment here...can you try submitting the image again? I'll take a look and give you some feedback.

#2040867
Screenshot 2021-05-02 105042.jpg

Hi, please see the screenshot attached.

#2041515
Screen Shot 2021-05-03 at 1.56.37 PM.png

The conditional here appears to be testing whether or not the Price field contains a value equal to the date function NOW(). Based on what you said before, it seems like the conditional criteria should be adjusted to test whether the Price field has a non-empty value. See the screenshot here for an example conditional testing for a non-empty value: "NOT" is selected in the top-left corner and "Empty value" is the operator.

#2041999

My issue is resolved now. Thank you!

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