Hi all,
I know setting a field to readonly has been done to death, but I canāt get this to work.
I have the opportunity sales stage linked to the opportunity probablity. I want the probability to continue to change when the sales stage is altered whilst preventing the user from editing the field (but it still needs to be visible on edit/detail views).
Manually editing the source in Chrome devtools to the following is what I want to achieve, as it works perfectly.
<input type="text" name="probability" id="probability" size="30" value="90" title="" tabindex="0" readonly>
What Iāve tried;
Editing ācustom/Extension/modules/Opportunities/Ext/Vardefs/sugarfield_probability.phpā to
$dictionary['Opportunity']['fields']['probability']['readonly']=true;
Editing ācustom/modules/Opportunities/metadata/editviewdefs.phpā to
0 => array (
'name' => 'probability',
'type' => 'readonly',
),
or
0 => array (
'name' => 'probability',
'readonly' => true,
),
For all of the above, Iāve performed a quick repair and cleared cache but the outcome is not what I want.
Any other suggestions?