Eg If the value is 0, change text to red.
If it is 1, change text to green
How can I make this appear in the items in a table?
Thanks for the answer.
But another question arose.
How can I use the switch to check if there is something written in the database table and get a return?
Ex.
Optional upload of files.
Check if there is any data written in the table and show the link to view the file, if not leave it blank.
Sorry my english hehe
{var.empty: Will be either true or false
Sorry, but I did not understand how to use it
Please detail
{var.empty:variable_name} as the data source in a switch
Good Morning
One more question regarding the switch in CF.
Database Ex:
db_brand: Ford, Chevrolet
db_cars: Mustang, Fusion, Camaro, Equinox ...
I have two dropdowns, in the first db_brand load, this relates to the second dropdown that loads db_cars.
Everything is working perfectly, to load the second dropdown I do a reload.
My problem is when I use the new function, Allow Additions.
When I type a new car for example, when reloading, the second dropdown goes blank, I would like it to be reloaded along a default value.
How can I do this?
You can use a * as a wildcard in your switch if you have the latest version
OR you can just use a default in your dropdown. It should look something like this
{var:mybuiltdropdownlist/apples=Apples are my favourite fruit}
This way if the mybuiltdropdownlist is empty, then a value of "apples" with the label "Apples are my favourite fruit" will be supplied instead.
How do I *
The other option, when reloading the second dropdown, disappears
*sigh*
You know how in a switch you have say
1:Something you want shown if it's 1
0:Something you want shown if it's 0
?
*:Something you want shown if it's anything else
Just make sure that * comes last.
Even though it works that way, but whenever reload is given it returns two values,