Page 1 of 1

Conditional Tab Colour

Posted: Wed Jun 01, 2016 6:55 pm
by ScottG
Is there any way to change the colour of a Tab depending on a database field?
What I am looking to do is within a contact database, for example, when I select a contact I already have a number of tabs of information but now want to have an Alert tab with say 5 check boxes on it. If check box 1 is ticked I want the tab to be Red in colour if any of the other 4 check boxes are ticked then I want the tab to be orange in colour or normal grey if nothing is ticked. (Its an easy visual way to indicate an alert status without going into the Alert tab.

Re: Conditional Tab Colour

Posted: Thu Jun 02, 2016 2:48 pm
by hanstel
F12 is your friend
identify the handle, fire 'onchange' and apply your-css to the handle

Re: Conditional Tab Colour

Posted: Wed Jun 08, 2016 2:52 am
by admin
ScottG,

hanstel is right.

Changing a field's background color can be done like this..

Code: Select all


   $('#field1').css('background-color','red');

Steven