How to make a custom field read only in detail view??

How to make a custom field read only in detail view??

Thanks!!

Parents Reply Children
  • 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!