How to make a custom field read only in detail view??
Thanks!!
How to make a custom field read only in detail view??
Thanks!!
Hi sugardeveloper11,
Do you want to make a field as readonly in 'Detail view'?
yes, with coding , no matter admin or regular user.
thanks!!
We cant edit fields in Detail view.Which means it will be in read only right. If i misunderstood,Can you please elaborate?
Thanks!.
We cant edit fields in Detail view.Which means it will be in read only right. If i misunderstood,Can you please elaborate?
Thanks!.
Correct, I would like to create a textfield which only display data but disallow users from editing it.
Can you add below code to your module
create one file in below path
/custom/Extension/modules/{module-name}/Ext/Vardefs/{your-file-name}.php
add below code
<?php
$dictionary['module']['fields']['field_name']['readonly']=true;
Then make repair and rebuild.
Thanks!.
Thanks alot!!
But I cannot get the field turns into readonly, I am using sugarcrm 7, any idea?
Can you please paste the code here?
Hello,
What Ajay suggested has to work! In which module you are trying to do this?
<?php
$dictionary['module']['fields']['field_name']['readonly']=true;
Here 'module' represents your module and it should be proper. For example if you trying for Contacts module 'module' should be replaced with 'Contact', not Contacts. To find this search for the vardef file cache/modules/<Your Module>/YourModulevardef.php and see the key being used for $dictionary array.
Let us know your findings.
Thanks!