• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Cell background color depends of other cell value

Cell background color depends of other cell value 12 years 2 days ago #17395

  • dethierp
  • dethierp's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
Hi,

I'm a rookie with CSS and java but I'm trying to implement a conditional formating of the background color of a cell in an html table based on an other cell value.

Example:

HTML TABLE
CELL1 CELL2 CELL3
VALUE1 VALUE2 VALUE3

CSS
.rsform-input-box-1{
background: red;
}
.rsform-input-box-2{
background: yellow;
}
.rsform-input-box-3{
background: green;
}

CONDITIONAL FORMATING
If "Value1" = 1 -> backgroung colour of "Cell1" to be "rsform-input-box-1"
If "Value1" = 2 -> backgroung colour of "Cell1" to be "rsform-input-box-2"
If "Value1" = 3 -> backgroung colour of "Cell1" to be "rsform-input-box-3"
and the same for value 2 and cell 2, value 3 and cell 3, ...

Any help on how to do this? I'm stuck since I don't know how to use such variables in the HTML code.

Thanks

Philippe
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!