Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [javascript]

The tag has no usage guidance.

2
votes
1answer
41 views

Could not establish connection

I am using CiviCRM for 6 months now and suddenly, since a couple of weeks when I try to enter or change an address I get a pop up saying "Netwerkfout Geen verbinding met de server. Ververs deze pagina ...
1
vote
0answers
20 views

CKeditor extrange behavior: UI settings are only saved partially, and defaults load every time

I can not, for example, hide a button (spelling for example) using CKeditor settings: /civicrm/admin/setting/preferences/display?reset=1 If I hide it, I can see how it's hiding at the moment at the "...
1
vote
0answers
15 views

Assigning a php associative array to JS?

I am trying to assign a php array to js. // On the Server: CRM_Core_Resources::singleton()->addVars('myNamespace', array('foo' => 'bar')); // In the JS file or inline script CRM.alert(CRM....
1
vote
0answers
16 views

Post upgrade to 5.8, Javascripts running in Drupal are failing with CRM is not defined

Both on drupal blocks where references to CRM.$ are used and in custom javascripts that call CRM.api3, the scripts are failing and displaying an Uncaught Exception: CRM is not defined. Everything ...
1
vote
2answers
19 views

How do I trigger a price calculation update on the event registration page?

The requirement is that if someone picks a complimentary part of the event they have to select a paid part. I have updated with jquery the rule so that if someone checks a free option the ...
1
vote
2answers
23 views

Correct method for API calls on contact summary page? (slow!)

I pull out some important at-a-glance information on contact summary pages - membership info, relationships via related cases, etc. At the moment i override contentsummary.tpl and do my API calls ...
2
votes
2answers
58 views

Jquery not affecting custom fields of an activity

I have written some jquery (inside an extra template file) that does some simple show/hiding of custom fields in an activity based on user selections. We use it as a helpful tool for users to select ...
2
votes
0answers
45 views

How do you select a value of an EntityRef Select2 using jQuery?

I have a scenario where a user selects a row of data to edit and I want an EntityRef Select2 box to be populated with a piece of information from that row. The EntityRef select2 widget works for ...
2
votes
2answers
97 views

status page not loading nor new mailing page

so I get this error in console JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js:2:542 SyntaxError: expected expression, got '<'[Learn More] en_US:1 Error: CRM.url called before ...
2
votes
2answers
64 views

How to update contact email with JavaScript API?

I'm trying to update a contact and, especially, the email address. As far as I can tell using the API explorer, this is the correct JavaScript code for that: crmApi('Contact', 'create', { ...
5
votes
2answers
191 views

Wordpress Ajax & pictures not loading after upgrade to 5.0

I've updated from 4.7.29 to 5.0.0 The SQL update went well, but I've issues with JS/Pictures not loading. This is really blocking as for example, the "Create new contact" is not loading See ...
1
vote
1answer
23 views

Scripts not running in contribution pages

Contribution page loads slowly and is missing the field for "total amount" . Viewing in console indicates that all scripts fail to load because the path references source path of https://xxxURL.xxx/...
1
vote
0answers
891 views

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

I am having difficulty customising the display of a DataTable for a contact custom field group (multiple-record tab). I am trying to write an extension that would use a bit of JavaScript to interact ...
3
votes
2answers
44 views

Civicontribute radiobuttons without “none”, where the “Other” contribution field deselects radiobuttons

This is a Theming/UI question for CiviCRM. I've done some theming to turn the radiobutton's into clickable options. When I select an amount it updates the 'Regular Amount' field. However, when I ...
1
vote
1answer
49 views

Javascript Contact API - how do I 'do something' with results

Through javascript, I was hoping to check what groups a user belongs to and then use that information to show / hide something. I can't use ACLs because I'd like the average internal user to be able ...
1
vote
1answer
45 views

API URL needs administrator

I am writing an extension which uses a CRM.api3 call in javascript on the contribution page. However, the link that is generated is lacking the "administrator" part. For example, The API call to ...
1
vote
1answer
99 views

After upgrade to 4.7.23., icons do not show (Civicrm on WordPress) (SOLVED)

As you can see in the picture below, icons do not show. They are missing on all pages, also on buttons. This does not change after emptying cache and rebuilding the menu. I've also checked the ...
1
vote
1answer
45 views

How can I configure my contribution page so that recurring is not pre-selected by default?

Obviously, I want to provide the option for recurring but I do not want it to load the page with default recurring selected. I think this is the way most administrators would want it to work. Should ...
1
vote
1answer
66 views

Fill in custom field of type contact reference field from javascript returns TypeError

I have a custom field, which is a contact reference field. Based on what the user fills in on the form, I would like to fill in the contact reference field with a specific contact. Leaving the user ...
2
votes
1answer
1k views

How can I trigger a selection for a Select2 EntityRef element via javascript?

The CiviCRM EntityRef form element uses a Select2 select box to make lots of CiviCRM forms more awesome. A user can, for example, search for contacts to choose one. Great. I am building an extension ...
1
vote
0answers
12 views

Which javascript features can I use in CiviCRM core?

Does CiviCRM have an agreed-upon browser version to target for javascript features? For example: Can I use Object.create() (IE 9+)? Can I use 'use strict'; (IE 10+)? Can I use let (IE 11+)? Can I ...
0
votes
1answer
1k views

Javascript MIME type mismatch error after server move

I have moved the installed civicrm with Drupal from windows PC to Linux PC and changed the civicrm settings file. Everything working fine but only the javascript files are not loading. The resource ...
1
vote
1answer
145 views

Ajax error when viewing relationships under IIS and Joomla (HTTP400 - invalid syntax)

This is similar to Ajax Error when trying to view relationships tab, but the analysis is different. It is not solved by increasing the request limits - they are much higher than the GET parameter. ...
1
vote
1answer
597 views

DataTables warning with dedupe on find & merge (after upgrade to 4.7.18)

Is anyone else seeing a new DataTables warning in 4.7.18? We get the following warning on the dedupe page when finding duplicate contacts: [Server Name] says: DataTables warning: table id=...
1
vote
2answers
158 views

Getting CiviCRM resources to load on the Joomla frontend

I have created an Event in CiviCRM and it all worsk fine in the Administrator side of Joomla when I test the Online Registration page. I have a price set of various ticket prices and the total adds up ...
1
vote
3answers
176 views

Backbone javascript conflict causing Configure Event / Repeat to fail

Problem with a Civi 4.7 installation on WordPress 4.7.2 -- due to other complications involving Backbone, we are NOT running JetPack. I found a related question in CiviEvent 4.7.7 Issue with ...
0
votes
1answer
127 views

JavaScript Errors / CRM.$ is not a function

After updating CiviCRM to the latest 4.6, I have been experiencing various Javascript errors. For example, on a contribution page: (notice the CRM.$ function is defined after the page is loaded) I'...
1
vote
2answers
34 views

How can I resolve Civi Dashboard Javascript error: widget.name is null?

I've just upgraded a Civi 4.6.18 install to 4.7.15. All has gone fairly smoothly, apart from the fact that the CiviCRM front page/dashboard is broken. My Firebug console reports: "TypeError: widget....
2
votes
1answer
140 views

Issue where soft-credits will not save

We've been having this issue over at least one major upgrade where certain types of soft-credits just will not save, without leaving any type record in the error logs. Crediting an individual from ...
3
votes
1answer
244 views

Getting a Custom Field Value on a Contact with Javascript API

I have a custom field for contacts that I would like to retrieve the value for using JavaScript. Using the API explorer I have generated the code that does this. It works PERFECTLY from the API ...
6
votes
1answer
78 views

How to go about making a Core Tab on the Contact Summary screen view Inline instead?

Specifically -> I'd like to see what's in the Membership Tab -> Inline instead. I'd like that table with Active Memberships printed right at the top underneath the Display Name on civicrm/contact/view?...
1
vote
2answers
165 views

Unable to create a new mailing

I am editing this question to provide more information. I am running CiviCRM 4.7.8 with WordPress 4.5.3. We are using php 5.6.23. When selecting "New Mailing" from the "Mailings" menu, the screen is ...
1
vote
1answer
100 views

Authorize.net seal and JS in footer

So, utilizing Authorize.net, the verification seal code has a JS call in it. However, when trying to save the online event registration page, CiviCRM complains that there may be a JS attack in ...
1
vote
2answers
695 views

CKEDITOR is undefined when form is being loaded in model frame outside of /civicrm/ path

Yet another question regarding JS resources load outside of civicrm. We load contact edit form via CRM.popup from a page outside of /civicrm/ path (from custom dashboard page created in drupal). So ...
4
votes
2answers
63 views

hide select box options in contributed page

I am currently trying to edit : sites/default/files/civicrm/templates_c/CRM/Contribute/Form/Contribution/Main.tpl to try and alter when select box A of pricesets are chosen then hide an option in ...
2
votes
1answer
121 views

After CiviCRM 4.7 upgrade, CRM.$ Not A Function Errors

After upgrading to CiviCRM 4.7, several CiviCRM related pages/functions on my site are not working and reporting errors related to CRM.$ not being defined as a function, but I can't find where it ...
5
votes
2answers
210 views

How to get contact id of logged-in user in JS API

Sorry if I'm being thick here, but I've looked and looked. Is there an API call to get the contact id of the logged-in user? What I need to do is check whether an activity has been authored by the ...
1
vote
1answer
91 views

Updating Custom Form Value via jQuery not Saving to Database

I have been charged with developing CivicCrm for my place of business. The company I work for is a nonprofit and we help people with disabilities both mental and physical. The Department that deals ...
1
vote
1answer
74 views

Suppress 'Unsupported locale specified to parseStreetAddress: en_GB' message

If debugging is enabled, 'Unsupported locale specified to parseStreetAddress: en_GB' message appears in some situations (add/edit contact), which scares non-techy editors. There are some ancient ...
0
votes
1answer
49 views

Fatal error: Class 'CRM_Core_Resources' not found in

if ($formName == 'CRM_Contribute_Form_Contribution_Confirm' && $form->_id == 1) { CRM_Core_Resources::singleton()->addScriptFile(drupal_get_path('module','custom_water') .'/', '...
3
votes
1answer
50 views

Civi AJAX API Search by “AND”ing 2 Tags

I would like to search the Civi API for Contacts that have both of two tags. I'm at a loss as to how to do this. Right now if you provide multiple tags, the default is to use an OR operation. For ...
3
votes
0answers
37 views

Civi Ajax API Search by Multiple Tags

As sort of a followup to this question. I am trying to retrieve all the contacts who have tag:5 AND who have tag:7. I tried the following code: CRM.api3('Contact', 'get', { "sequential": 1, "...
5
votes
1answer
117 views

CiviCRM Ajax API - Searching by Tag

I'm working with the CiviCRM API and it's been great--I've been able to make a very useful tool for our team. However, I've encountered a problem. I would like to do a search on contacts based on ...
1
vote
1answer
44 views

Replace default Datatables script to most recent [custom buit] one

How do one properly replace default 3-rd party packages without loosing changes after updates? Namely, in need of Datatable CVS File Export, we've grabbed a custom DataTables built with all bells&...
3
votes
2answers
509 views

Refresh page after closing modal opened by .crm-popup outside of CiviCRM

We've a page (in Drupal) outside of CiviCRM for "editors" (mean, users with restricted permissions) to perform some civicrm tasks. From this page civicrm forms is being opened in modal frame via ....
3
votes
1answer
89 views

Drupal's Aggregate Javascript breaks CKEditor Config

With Aggregate Javascript turned on under Administration » Configuration » Development » Performance, Civi's Configure CKEditor page doesn't display the editor's container or configurator. Drupal 7....
3
votes
0answers
26 views

Upgrade to 4.5.0 fails

I'm trying to move from 4.4.19 -> 4.6 (Old LTS to new LTS). Having trouble and not sure where to look next. Any suggestions would be appreciated. When I go to the update page /civicrm/upgrade?reset=...
0
votes
1answer
135 views

Unable to Select Mailing Recipients

CiviCRM 4.6.10 and 4.6.11 Joomla 2.5.28 No Civi extensions installed Have tried different templates, disabling Joomla plugins, switching WYSIWYG editors, etc. Rather extensive error log in web ...
0
votes
3answers
99 views

Upgraded to 4.6 Civicrm javascript errors Error can't send email or press some buttons

Error: b.indexOf is not a function b@https://www.websiteremoved.com/administrator/components/com_civicrm/civicrm/bower_components/select2/select2.min.js I can't add receipients or get past step one ...
0
votes
3answers
79 views

CiviCase error “required params missing”

I'm getting a fatal error in the popup when trying to edit Case details (eg Type, Status) by clicking on the grey pencil in the contact summary. This has only happened since I moved the installation ...