New answers tagged

2

If you want to use CRM.checkPerm() JS function than you will need to add permission using hook and than it will be catched in CRM.checkPerm() js function. eg: In hook function extname_civicrm_buildForm($formName, &$form) { if ('Some_FormName' == $formName) { CRM_Core_Resources::singleton()->addPermissions('administer CiviCRM'); } } and than ...


1

Putting this in Relationship.extra.tpl works. Both ajaxSuccess or ajaxComplete events works. Thank you Pradeep. {literal} <script> CRM.$( function( $ ) { $( document ).ajaxSuccess(function( event, request, settings ) { // do stuff } ) } ) </script> {/literal}


2

You can use preProcess or BuildForm hook on formname CustomDataType and unset the custom group or field based on user role or id You can use PageRun hook and unset the variable in smarty template based on condition and it will not display on view page since the custom fields are build using ajax, you can also use ajaxSuccess jq event to remove the custom ...


Top 50 recent answers are included