Results 1 to 2 of 2

Thread: Change Text Color

  1. #1
    kdmp is offline Sugar Community Member
    Join Date
    Feb 2011
    Posts
    18

    Default Change Text Color

    I am trying to find a way to change the test color of the contents in Description in the account details. I tried all that I could think of in regards to CSS (probably overlooked the easiest solution) and have tried searching for the template file that displays it.

    Do I have to do a custom module or can I not make a change to this?

    I tried following this:

    https://www.sugarcrm.com/forums/showthread.php?t=62133

    I opened custom/modules/Accounts/metadata/detailviewdefs.php and added customCode to description.

    'description' =>
    array(
    'name' => 'description',
    'comment' => 'Full text of the note',
    'label' => 'LBL_DESCRIPTION',
    'customCode' => '<font color="red">{$fields.description.value}</font>',
    ),
    Last edited by kdmp; 2011-02-24 at 06:25 PM. Reason: Addition of steps tried

  2. #2
    robertbmirth is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Irvine, CA
    Posts
    345

    Default Re: Change Text Color

    mmm... the previous example should work; however, if you're not in developer mode, your metadata cache may not have been cleared and as such your previous metadata may still be used. I literally copy/pasted your code into my metadata file and it works for me (running 6.1.2).

    If that still doesn't work, you can work up a little hack into the smarty templates (would require you to copy/modify your view.detail.php and DetailView.tpl files; I couldn't help you with it directly as I've only done it for list view and not detail view). I wouldn't suggest doing it this way though; it shouldn't be needed for detail view (as opposed to list view) and its a lot of work for such a simple thing.
    Robert Beckman
    Software Engineer
    Mirth Corporation

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change color in the listview
    By nanduruchi in forum Developer Help
    Replies: 3
    Last Post: 2010-11-13, 06:09 PM
  2. how I can change font and color?
    By MahsaN in forum Developer Help
    Replies: 1
    Last Post: 2010-08-09, 11:09 AM
  3. Text Color
    By alliancecomputers in forum Help
    Replies: 2
    Last Post: 2010-06-27, 02:18 AM
  4. Change color of certain specific text fields
    By imrankha in forum Developer Help
    Replies: 6
    Last Post: 2009-01-28, 11:33 AM
  5. Change some row color
    By portega in forum Help
    Replies: 5
    Last Post: 2008-05-15, 11:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •