Created
April 22, 2015 18:46
-
-
Save dmulvi/7106421794735b77bed3 to your computer and use it in GitHub Desktop.
Make a field readonly in SugarCRM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* This will make a field readonly. Create this file here: | |
/custom/Extension/modules/MODULE/Ext/Dependencies/ | |
and then Quick Repair/Rebuild */ | |
$dependencies['MODULE']['FIELD_NAME_readonly'] = array( | |
'hooks' => array('edit'), | |
'trigger' => 'true', | |
'triggerFields' => array('FIELD_NAME'), | |
'onload' => true, | |
//Actions is a list of actions to fire when the trigger is true | |
'actions' => array( | |
array( | |
'name' => 'ReadOnly', | |
//The parameters passed in will depend on the action type set in 'name' | |
'params' => array( | |
'target' => 'FIELD_NAME', | |
'value' => 'true', | |
), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment