CA Service Management

Expand all | Collapse all

Different color to a form field

Jump to Best Answer
  • 1.  Different color to a form field

    Posted 06-06-2017 12:28 PM

    Hi Community,

     

    I would like to see the possibility of having a different color (Highlighting) to a field  on a detail form.

     

    1. after saving the ticket, if the organisation name is 'Important'  we would like to highlight the organisation field to get extra attention to the ticket.

     

    Second question is in the ticket list page how to add the any image at staring of the ticket so that analyst comes to know that it must be given high priority.

     

    Regards,

    Venkat



  • 2.  Re: Different color to a form field

    Posted 06-06-2017 02:20 PM

    Not sure abut changing the color of the field, but we do show a message at the top for certain values in the fields. Maybe this would work for you or maybe you can tweak this to make it work.
    This is done on the detail_in, cr, etc.

     



  • 3.  Re: Different color to a form field
    Best Answer

    Posted 06-08-2017 07:30 AM

    Thanks dion.alexander,

    much of the blow code referenced from cdtj posts.

    I have achieved my objective as below.

     

    1. added a Eventlister

    window.addEventListener('load', customerOrganisation, false);
    window.attachEvent('onload', customerOrganisation);

     

    2. function defination

     

    function customerOrganisation() {   
    jq("[class=detailro]").each(function (index) {      
    var thisvar = jq("td[pdmqa='customer.organization.name']");       
    if (typeof(thisvar) !== "undefined") {           
    var customorg = (jq(thisvar).text());          
    if (typeof(customorg) !== "undefined") {               
    customorg.trim();               
    if (customorg.toLowerCase().indexOf("infocrossing") > -1) {                   
    jq(thisvar).css('background-color', 'yellow');               
    }}}   
    });
    }

    Thank you.

    Venkat