Questions tagged [javascript]
The javascript tag has no usage guidance.
86
questions
1
vote
1
answer
25
views
How to add JavaScript to an AJAX snippet
I need to customize the fields of a form inside a dialog popup from within an extention. The common form hooks obviously don't work here because I can't address code that's loaded dynamically. Is ...
0
votes
1
answer
21
views
How to add custom JavaScript globally?
How do I add custom JavaScript to an extention so it appears on all pages?
0
votes
0
answers
26
views
civi api response limit working in postman but not in javascript
I created a postman test with api4 of civicrm. It adds to the body as x-www-form-urlencoded:
key: params
value: {"limit": 5}
This works fine and returns only 5 results.
I tried to do the ...
1
vote
1
answer
36
views
Contact Quick Edit, refreshParent after CRM.api3('CustomValue', 'create)?
Stuck with jQuery, which intercepts a contact Quick Edit and updates a custom field. All is fine and a value gets updated in the database but is not immediately shown, need to click "Edit" ...
2
votes
3
answers
91
views
Custom javascript file is not refreshed
I embedded a JavaScript file inside a custom extension via the buildForm hook. The file gets loaded and does its job, however it is not reloaded reliably after an update. When I upload a new version ...
0
votes
1
answer
25
views
Event config page suddenly not working
This evening, I was working on adding a few custom fields to a profile we're using for an event. Finished up, tested, all was well. I went to take my test registration off the event and check that ...
0
votes
0
answers
9
views
contribution page loop with js errors
WP 6.03 civi 5.52 payment processor is OmniPay - Eway_RapidShared
Had been working fine - have removed all recent plugins & disabled wordfence, all caches cleared
after clicking contribute the ...
0
votes
0
answers
24
views
Can you create a select menu that contains all values in a certain column?
Is there a way in afform/Form Builder to create a select menu that contains all values in a specified column? An example would be First Name. I know that afform offers search fields, but these are ...
3
votes
1
answer
49
views
Horizontal scroll bar on searchkit/afform
We have been using SearchKit and Form Builer (afform) to develop new reports for our teams. Some of the tables have grown to be quite extensive. The headers are becoming difficult to read because the ...
0
votes
1
answer
42
views
How to pre-fill price or "other amount" from the querystring in payment pages
We would like to be able to pre-fill the price or "other amount" in a Civi payment page based on the querystring parameters. I have tried creating an extension which adds some Javascript to ...
3
votes
1
answer
1k
views
How to set ckeditor text with javascript
Is it possible to set ckeditor text with javascript for a custom field?
I want to do something similar to the mail templates selection.
I try $('#custom_162_126').val('blub') but this only change the ...
1
vote
1
answer
49
views
How do I use the javascript field in the price_sets table of the database
I have noticed that there is a field called 'javascript' in the 'price_sets' table in the CiviCRM database.
The comments associated with this field are:
'Optional Javascript script function(s) ...
0
votes
1
answer
298
views
Has anyone got a recent example of a REST client under Drupal 9, possibly using AJAX?
I am trying to work out a way of presenting contact information from CiviCRM to another server, but am struggling to work out how one would code it. Has anyone got an example of something that works ...
0
votes
1
answer
16
views
Member reports javascript broken after update
Somewhere between 5.15 and 5.36, javascript starts breaking on all member reports.
In the html body, javascript is searching for
$originalElement = $dateElement.siblings('#membership_join_date_from')....
1
vote
2
answers
64
views
How do I load javascript only on pages with CiviCRM loaded on them?
I'm trying to load a civicrm function. What is the recommended way to load 'CRM' checking that it is available on the page first?
CRM.$(function ($) {
'use strict';
...
addObserverFormErrors()...