• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Change Coloured Cells Depending on Value

buc

New Member
Hi, I can not figure out how to change color to a cell depending on the choice dropdown element fabrik, I tried so but nothing

In Use as row class di fabrik element i entered mialista but the result does not change


$element = $this->_row->data['richiesta___stato'];
if ($element == In elaborazione) {echo ".mialista {background-color: #FF0000;}";}
elseif ($element == Alla firma) {echo ".mialista {background-color: #FF9900;}";}
elseif ($element == Firmato) {echo ".mialista {background-color: #339900;}";}
echo "

help me please :(
 
1. Your code is wrong, must be
if ($element == "In elaborazione")

2. Not sure what you are trying to do where. If you set "use as row class" (it's just a yes/no, nothing to enter) you'll get a list view with HTML code
<tr class="element_value1" ...
<tr class="element_value2" ...
and you can set your CSS in custom_css.php
.element_value1 {background-color: #FF0000;}
 
Thanks for the answer, and I apologize if I was not clear enough.
I want to change color to a table cell, depending on the choice dropdwon made in data entry.

eg.
if I choose the "The signing" I wish that the cell color is yellow
if I choose the "Signed" want to appear red.

how can I do?

I set the custom_css, but I do not understand from your answer where to insert the code html

<tr class = "element_value1" ...
<tr class = "element_value2" ...

please can you help me.:(
Thanks.
 
Great I managed to do it but not quite
I put in the class cell
tr class = "Signed" td class = "signature"
in custom_css.php
.Firmato .richiesta Was ___
{
background-color: green;
color: black;
}
.At the signature was .richiesta ___
{
background-color: yellow;
color: black;
}
for "signed" works
no signature

I tried to write it so well in custom.css

.alla_firma .richiesta was ___
{
background-color: yellow;
color: black;
}

and
tr class = "Signed" td class = "alla_firma"

but wrong.

please help me last effort:(

thanks
 
Last issue ....
how do I get the color of the whole column?
so I just get the color on the first cell of the column
if I insert other data I colored only the last inserted.

thanks
 
I discovered inserting other data that I color the cells so
alternate

How can I fix?
 

Attachments

  • ima.gif
    ima.gif
    47.7 KB · Views: 403
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top