Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Site Notices
Posted: 7/27/2014 5:35:28 PM EDT

Hai gang!  

I'm dabbling around in sugarCRM for the first time.  

I have a label called Inactive customer it's a checkbox.  

The original intent was to change the color of the label itself green - unchecked, red being checked.  

The below code in detailviewdefs.php
replaced the checkbox with either a 0 or a 1  
Regardless of the condition of the checkbox the 0 & 1 are green.  
I would be happy with that outcome assuming the 1 changed to red.


array (
           'name' => 'inactivecust_c',
            'label' => 'LBL_INACTIVECUST',
        'customCode' => '{if $fields.inactivecust_C == "1"}<span style="color: red">{$fields.inactivecust_c.value}</span>{else}<span style="color: green">{$fields.inactivecust_c.value}</span>{/if}',          
 ),
       ),


Any Sugar CRM developers around here?
Link Posted: 7/28/2014 5:06:12 AM EDT
[#1]



'label'=>'{if $fields.inactivecust_c.value == "1"}<font color="red"> {$MOD.LBL_INACTIVECUST}</font>{else}{$MOD.LBL_INACTIVECUST}{/if}'


works just fine.  

In case anyone is curious.
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top