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?