Field Editor Conditional Formatting Color?

  • 2
  • Question
  • Updated 4 years ago
  • Answered
Is it possible to conditionally format a text field to a certain color when the text value is a specific entry?  For instance, RED text when the value is "incomplete"...
Photo of Scott

Scott

  • 2,722 Points 2k badge 2x thumb

Posted 4 years ago

  • 2
Photo of Moshe Karmel

Moshe Karmel, Champion

  • 8,646 Points 5k badge 2x thumb
Setup a custom field renderer like this:

var field = arguments[0],    value = arguments[1],
   $ = skuid.$;
if(field.metadata.accessible){
    if(value === 'incomplete'){
// do CSS stuff here...
        field.element.css({'background-color':'#F19A00','min-height':'10px'});
    }
    skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value);
Photo of Josh Cutler

Josh Cutler, Official Rep

  • 864 Points 500 badge 2x thumb
Very nice, Moshe! 

There's more information about Custom Field Renderers here: http://help.skuidify.com/m/11720/l/204496-table-component-custom-field-renderers

-Josh