Answers.Body: <p>You can setup ACL to restrict custom group edit to certain group contacts. This will stop them to update the custom field data and only view it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-29T09:29:26.050Z
Answers.Text: Hi Pradeep, thanks for the response be we need to restrict only certain rows of data rather than the whole group. I will update the title of the question to make this clear.
Answers.UserDisplayName: Darren
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-28T16:33:18.800Z
Answers.LastActivityDate: 2020-04-28T16:33:18.800Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>We have a use case whereby certain users should not be able to edit certain rows of custom data.</p>
  
  <p>CSS selectors can hide the "Edit" links for these rows, but the inline editing (i.e. clicking on the value in the table cell) is not easy to override.</p>
  
  <p>We have commented out the function in civicrm/civicrm/js/common.js where the jquery.crmEditable.js file is loaded, however this introduces limitations to many of the administrator functions and is not ideal.</p>
  
  <p>Is there a better way to disable the jquery.crmEditable.js functionality without modifying core code, e.g. with a custom template?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-28T15:57:51.823Z
Comments.Text: I may misunderstand what you are trying to achieve, but if you want to limit fields shown to various users/groups, do have a look at https://civicrm.org/extensions/contact-layout-editor
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-29T09:30:22.770Z
Comments.Text: Thanks @RebeccaTregenna but we need to disable the inline editing for certain rows of data in a group, not the whole group.
Comments.UserDisplayName: Darren
Tags: <custom-fields><custom-templates>
Title: What is the best way to disable the jquery.crmEditable.js file in CiviCRM without modifying the core common.js file?
ThreadText: # What is the best way to disable the jquery.crmEditable.js file in CiviCRM without modifying the core common.js file?
  
  (Asked by: username_0 on 2020-04-28)
  
  We have a use case whereby certain users should not be able to edit certain rows of custom data.
  
  CSS selectors can hide the "Edit" links for these rows, but the inline editing (i.e. clicking on the value in the table cell) is not easy to override.
  
  We have commented out the function in civicrm/civicrm/js/common.js where the jquery.crmEditable.js file is loaded, however this introduces limitations to many of the administrator functions and is not ideal.
  
  Is there a better way to disable the jquery.crmEditable.js functionality without modifying core code, e.g. with a custom template?
  
  **Tags:** custom-fields, custom-templates
  
  > **Comments:**
  > **username_1**: I may misunderstand what you are trying to achieve, but if you want to limit fields shown to various users/groups, do have a look at https://civicrm.org/extensions/contact-layout-editor  
  > **username_0**: Thanks @username_1 but we need to disable the inline editing for certain rows of data in a group, not the whole group.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-04-28. Score: 1
  
  You can setup ACL to restrict custom group edit to certain group contacts. This will stop them to update the custom field data and only view it.
  
  > **Comments:**
  > **username_0**: Hi Pradeep, thanks for the response be we need to restrict only certain rows of data rather than the whole group. I will update the title of the question to make this clear.  
  
  ---
  
  