Conditional Howto, if x or x then return value or do this

I don’t understand the concept of the Conditional Formatter. I mean if its indented, then it means in programming code like { } brackets??

I want to do this with wappler. I know how to code it, but not how to click it … :smiley:

if(is_enabled == 0) {
   print("NO");
   }
else {
   print("YES");
   }

@Freddy_Blockchain the syntax is:

is_enabled == 0 ? 'NO' : 'YES'

1 Like

hehe ok lets try that !

Haha okay works like a charm… is there some reference for that?

I don’t think so - it’s a standard JS expresison … https://www.w3schools.com/js/js_comparisons.asp

1 Like

Okay good yes JS Style....

What you suggest how to escape my elements properly, when I want to add Fontawesome icons instead of just YES or NO ?

Like that:

Early years I used " Backslash to escape, but not sure if thats the proper way....

I just see when copying the code from here it uses different quotation. I typed my quotation, but it looks again different. SO we have this: " then we have ' and we have ’