We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [javascript]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
1answer
82 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?...
6
votes
1answer
104 views

Moving Angular extension into /ang/

I'm attempting to move code from an angular extension into core. I've created an ang/crmModuleName and moved the ctrl and partials into it, and crmModuleName.css into the ang/ and crmModuleName.js ...
5
votes
2answers
253 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 ...
5
votes
2answers
261 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 ...
4
votes
1answer
128 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 ...
4
votes
1answer
44 views

Where in the CiviCRM codebase do css and js resources get output for an AJAX url or snippet?

I'm trying to debug a Drupal/CiviCRM integration issue where js/css resources that are added in an extension are not getting output. I think it should get output as part of a form snippet that's ...
3
votes
2answers
51 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 ...
3
votes
1answer
313 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 ...
3
votes
2answers
74 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 ...
3
votes
1answer
94 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
2answers
650 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
56 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
39 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, "...
2
votes
2answers
71 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
2answers
103 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', { ...
2
votes
2answers
128 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
149 views

Dashboard hangs; forces apache restart

This is in planning for upgrade to J!3. I have found no workable solutions here or elsewhere on the web. CiviCRM 4.6.4 Joomla 2.5.28 MySQL 5.5.38-1~dotdeb.0 Apache 2.2.16 PHP 5.3.29-1~dotdeb.0 Debian ...
2
votes
1answer
2k views

How to disable datepicker UI for a mobile device

I like the datepicker UI, but many people don't. We require date of birth on a few forms. Each week I get at least one complaint that someone can't fill out the form on a mobile. Not sure if a bug ...
2
votes
1answer
56 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 ...
2
votes
1answer
2k 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 ...
2
votes
1answer
143 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 ...
2
votes
1answer
132 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 ...
2
votes
1answer
39 views

Requiring “Assigned” and “Target” contacts when recording Activity

When creating a new Activity record, I need to require the "With contact" and "Assigned to" fields have a contact selected. In the activity/form/activity.php file I can add 'required'=>TRUE to the ...
2
votes
0answers
108 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
0answers
39 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=...
1
vote
2answers
35 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....
1
vote
2answers
183 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
2answers
25 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
28 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 ...
1
vote
1answer
118 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
2answers
67 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
3answers
192 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 ...
1
vote
1answer
180 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
1answer
38 views

Is Civi having a separate copy of jQuery inefficient?

In my html page source I can see 2 copies of jQuery; one for Drupal, and the other for CiviCRM. Surely this isn't very efficient. Is there a way to reconcile the two?
1
vote
2answers
332 views

Backbone JS error with 4.6.4 on WP messing up contribution page set up

It feels inappropriate posting this on Stack Exchange, but I don't see any other viable option since the support forum has been deprecated and no-one goes there any more, so here goes: Just upgraded ...
1
vote
2answers
46 views

Updating to civi 4.6 after this can't create new emails no text editor

After upgrading I can't create new emails. Also the menu bar is not showing right. Please look at my screen shots. step 1 and step2. Maybe a problem with javasript? Help is urgently needed since we ...
1
vote
1answer
24 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
1answer
60 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
55 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
214 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
726 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
181 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
1answer
113 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
1k 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 ...
1
vote
1answer
95 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
75 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 ...
1
vote
0answers
25 views

Civicrm on Drupal: broken JS and CSS or Asset Caching enabled

If I enable asset caching in CiviCRM everything works fine. If I disable it, the administration menu is gone from the top to a list that's beneath the page content and a lot of JS is broken too. The ...
1
vote
0answers
22 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
20 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
21 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 ...