Answers.Body: <p>how about using apiwrapper hook and throwing exception?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-17T17:04:44.003Z
Answers.Text: I have no idea what you are talking about? Don't overestimate me please @Pradeep :-) You will have to give me a little more detail to be of any help.
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-17T16:50:38.880Z
Answers.LastActivityDate: 2020-06-17T16:50:38.880Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I need to make a change where some of the contact identifiers (extension Identity Tracker) can not be changed by the user. I can do that with the validateForm hook. But the Contact Identities are actually custom data of the type &quot;tab with table&quot; and you can also edit them inline.</p>
  <p>The custom data tab with table uses the jQuery dataTables, and do not respect any hook unfortunately. In the  is a  with the class &quot;crm-editable-enabled&quot;. If I can change that class to &quot;crm-editable-disabled&quot; I would be fine, but I have no idea how to do that with the dataTables API and the documentation shows stuff like this:</p>
  <pre><code>CRM.$(function($) {
    var myTable = $('.dataTable').DataTable();
    myTable
            .columns('.crm-editable')
            .nodes()
            .flatten()  // Reduce to a 1D array
            .to$()      // Convert to a jQuery object
            .removeClass('crm-editable-enabled')
            .addClass('crm-editable-disabled');
  });
  </code></pre>
  <p>I can get the var myTable, but the rest does not seem to have any effect....any ideas?</p>
  
Tags: <custom-fields><jquery><datatables>
Title: How can I change a cell in dataTables (custom data type tab with table) to disable the inline edit?
ThreadText: # How can I change a cell in dataTables (custom data type tab with table) to disable the inline edit?
  
  (Asked by: username_0 on 2020-06-17)
  
  I need to make a change where some of the contact identifiers (extension Identity Tracker) can not be changed by the user. I can do that with the validateForm hook. But the Contact Identities are actually custom data of the type "tab with table" and you can also edit them inline.
  The custom data tab with table uses the jQuery dataTables, and do not respect any hook unfortunately. In the  is a  with the class "crm-editable-enabled". If I can change that class to "crm-editable-disabled" I would be fine, but I have no idea how to do that with the dataTables API and the documentation shows stuff like this:
  CRM.$(function($) {
    var myTable = $('.dataTable').DataTable();
    myTable
            .columns('.crm-editable')
            .nodes()
            .flatten()  // Reduce to a 1D array
            .to$()      // Convert to a jQuery object
            .removeClass('crm-editable-enabled')
            .addClass('crm-editable-disabled');
  });
  
  I can get the var myTable, but the rest does not seem to have any effect....any ideas?
  
  **Tags:** custom-fields, jquery, datatables
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-06-17. Score: -2
  
  how about using apiwrapper hook and throwing exception?
  
  > **Comments:**
  > **username_0**: I have no idea what you are talking about? Don't overestimate me please @Pradeep :-) You will have to give me a little more detail to be of any help.  
  
  ---
  
  