Alain
July 21, 2021, 2:38pm
1
Hi
Is the a way to output Text depending on a condition of a collection-field?
Example:
A table of product items.
If an item is sold, then I want to output only the text “sold” insteat of the actual price-text.
Is this possible with Webflow-Onboard-Tools?
Or do I need to solve this with custom code?
Kind regards
Alain
Hey Alain,
You should be able to add a condition based on if the quantity of the product is zero, so therefore has been sold
This link should help:
Alain
July 21, 2021, 5:05pm
3
Hey David
Your Link is about Visibility but I need something like
if quantity = 0 then element.innerText = ‘sold’;
Is that possible?
I would duplicate your text element, have one link to the price and unlink the other. Make the unlinked say “sold” then have the condition of quantity not equal to zero hide it, then another condition on the original text to hide the price when quantity is zero
1 Like
Alain
July 22, 2021, 9:26am
5
Thanks.
I was thinking about a similar solution.
Was just hoping that there is a more elegant solution
1 Like
Hitting the same road block building a quiz not using forms. I’m going to try airtable and nocodeapi to translate the image as a data number and return if then JavaScript on the front end. This is what I’m watching: Build a Buzzfeed style quiz in Webflow with Ben Parker | AATT #61 - YouTube