Forum Documentation Showcase Pricing Learn more

How to hide Text when value is 0

Hello! I’m trying to hide a text box if the value is 0. I tried doing this with conditional formatting but I dont see an option for when “This Text” is 0

If anyone knows how to do this or a work around, please let me know!

Thank you for all the help!

image

Text elements DISPLAY data, they do not STORE data.

A text element does not have a value. It has no output. However, it may display the value of some input.

This is — admittedly — a touch confusing as we can write (and see the value of) expressions in a text element.

However, the result of such expressions are stored nowhere, nor can we reference them. (All we see is their result in the DOM.) We must, instead, just rewrite the expression that lead to the value we are displaying in the text element.

ALTERNATIVELY, we can compute the value we wish to display in the text element and store it somewhere (e.g., in a custom state or in a plugin like List Shifter) and then refer to that “variable” both in our text element and in some other field (such as a conditional).

Use the underlying value of the text - in this case “Current User’s user5”.

Thanks for the help! The main issue is I need the value to be saved as 0 for the filtering to work but if the value is 0, I want it to not be visible on page load. Is that possible?