Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Conditional Tab Colour

Post Reply
ScottG
Posts: 6
Joined: Fri Nov 20, 2015 2:57 am

Conditional Tab Colour

Unread post 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.
hanstel
Posts: 28
Joined: Sat Apr 30, 2016 2:51 am

Re: Conditional Tab Colour

Unread post by hanstel »

F12 is your friend
identify the handle, fire 'onchange' and apply your-css to the handle
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Conditional Tab Colour

Unread post 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
Post Reply