Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
2 votes
Accepted

Contact Quick Edit, refreshParent after CRM.api3('CustomValue', 'create)?

Use below $('.crm-custom-set-block-5 .crm-summary-block').load(CRM.url('civicrm/ajax/inline', { cid: '133', class_name: 'CRM_Contact_Page_Inline_CustomData', groupID: '5', customRecId: '1', ...
Pradeep Nayak's user avatar
2 votes
Accepted

How to add JavaScript to an AJAX snippet

The buildForm hook works for popups too. TIP: put some logging in a buildForm hook to log the $formName, then visit the page you're interested in. If you're interested in new case, see https://lab....
Demerit's user avatar
  • 23.1k
1 vote
Accepted

How to add custom JavaScript globally?

You can implement hook_civicrm_coreResourceList to add your script to the list of items loaded by CiviCRM on every page.
Coleman's user avatar
  • 18.7k
1 vote
Accepted

Custom javascript file is not refreshed

... a JavaScript file ... When I upload a new version of the file it takes quite some time until it is picked up by CiviCRM, sometimes hours. I have cleared caches and disabled asset caching, didn't ...
Tim Otten's user avatar
  • 5,684
1 vote

Custom javascript file is not refreshed

Following-up on Coleman's comment about composer civicrm:publish.... I don't know if that was confirmed to be part of the issue here. But here's a little braindump about when that should or shouldn't ...
Tim Otten's user avatar
  • 5,684
1 vote

How do I load javascript only on pages with CiviCRM loaded on them?

I would recommend to create a CiviCRM extension that implements either the pageRun or buildForm hook, which then checks which page you are on and loads the JavaScript file. If your JavaScript needs to ...
bgm's user avatar
  • 3,421
1 vote

How to modify a custom field DataTable (sorting and appearance) from an extension?

I managed to sort on the first column of a dataTable like this: In the main file of your extension, add the code to add a javascript file. I used the hook "civicrm_alterTemplateFile" for ...
AlainB's user avatar
  • 552

Only top scored, non community-wiki answers of a minimum length are eligible