1

I have an issue that i need to change the font color to be red when we edit the Project task list in my drop down Task Status feild

when the Task status is Late > color in red and we choose another value to be on Black color

Let me know if its feasible

Thanks

0

I did exact same thing in sharepoint designer. Based on selection in status field, the whole row background colour would change. That was my case. But you can change only particular cell colour , or text colour as well. To do that i been to my view, ( in sp designer ) , then select particular field or column, then aa far i remember there is an option conditional formatting.... when you get that, you can do any change according to your need. In your case , firstly give your cindition ( which is, status= late, then - change in style accordingly. I did it without any code and my system was appreciated. Please let me know, if it worked. Thnx

0

You can accomplish this with jQuery. See here for an example on how to add it to SharePoint.

Go to your task list, then on the ribbon, click on List > Customize List > Form web parts > Default Edit Form.

Add a Content Editor web part and in the Content Link box, set a link to a js file that you will put in a document library of your choice (eg. SiteAssets library).

Inside this js file, put this code:

<script type="text/javascript"> 
    _spBodyOnLoadFunctionNames.push("bindOnChange");

    function bindOnChange(){
        $('select[title="Status"]').change(function(){ 
            $(this).css('color', 
                $(this).val() == 'Late' ? 'red' : ''
            );
        });
    }
    </script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.