I want to make Radio button field as read-only when Account field is not empty. I have tried using dependency but it didn't work.
I want to make Radio button field as read-only when Account field is not empty. I have tried using dependency but it didn't work.
Hi Kenneth,
I have tried both links but still facing issue. i am using SugarCRM 9.x
Hello Sundar Kumar,
Could you please provide more details about the dependency you are using?
Regards,
Angel M.
Hi Angel Martinez,
<?php
$fields = array(
'test_c', //custom radio field type
'quote_stage',
'payment_terms',
'description',
);
$dependencies['Quotes']['read_only_fields'] = array(
'hooks' => array("edit"),
//Trigger formula for the dependency. Defaults to 'true'.
'trigger' => 'true',
'triggerFields' => array('opportunity_name'),
'onload' => true,
//Actions is a list of actions to fire when the trigger is true
'actions' => array(),
);
foreach ($fields as $field) {
$dependencies['Quotes']['read_only_fields']['actions'][] = array(
'name' => 'ReadOnly', //Action type
//The parameters passed in depend on the action type
'params' => array(
'target' => $field,
'label' => $field . '_label', //normally <field>_label
'value' => 'not(equal($opportunity_name,""))', //Formula
),
);
}
the above changes are not working for Radio button but its working fine for other field types.
Do you have any solution for this?
Thanks!