17 votes
Accepted

How can Members download their own Membership Certificate/Card in Drupal 7?

No custom code required! If you're on Drupal Views integration, which ships with CiviCRM - all that's required here are Drupal modules Views, Views PDF and installation of two libraries for the PDF ...
user avatar
12 votes

How do I use Views with CiviCRM?

It is the regular Drupal Views module, but if you have Drupal and CiviCRM in separate databases, you have to edit your settings file to let Views know where to find the CiviCRM data. (Coleman notes in ...
user avatar
11 votes
Accepted

Calculate Contact age in a Drupal view

In your view, pull in the CiviCRM birth date field. Under date format, select Time ago. This will present the D.O.B. field as 40 years 7 months To remove years and months from the output you can ‘...
user avatar
9 votes
Accepted

How to create a Drupal View with multiple CiviCRM relationships?

You can use the relationship section of a view for this. A relationship in a view is a relationship between entities don't confuse it with the relationship you have between contacts. So you could set ...
user avatar
9 votes
Accepted

How to show civicrm toolbar in drupal also?

To answer your question, I wrote a module: https://www.drupal.org/project/civimenu The code snippet I posted below probably wouldn't work because of timing issues (by the time the block was being ...
user avatar
  • 16.2k
9 votes
Accepted

How to put your CiviCRM Contacts on a Leafleft Map in 5min?

Leaftlet is an open-source JavaScript Library for interactive mobile friendly maps. It only takes a few minutes to put your CiviCRM Contacts on a Leaflet Map if you're using Drupal. Here are some of ...
user avatar
9 votes
Accepted

How to get CiviCRM Views to work in Drupal 8 with separate CiviCRM database

I had the same problem today, so I looked in the source code. In civicrm.install there's a function called _civicrm_get_db_config. It's looking in the $databases array for an element with a key ...
user avatar
7 votes
Accepted

How do I use custom fields in Drupal views?

Saw the same issue here. We noticed that the field appeared twice in the list of fields. We'd selected it as CiviCRM Contact: My Field - but it also appeared as CiviCRM Custom: My Field. When we ...
user avatar
  • 2,345
7 votes
Accepted

Activity Report in Views

No aggregation necessary. Under relationships add two relationships for activity contacts. Select one to be the source and the other to be the target. Once you've got those relationships, you can ...
user avatar
  • 1,811
7 votes

Managing multiple CiviCRM relationships in a Drupal View: A case study for A->C plus B->C relationships

Here's my solution for achieving the three goals outlined in the question. I may edit this a bit as I find errors and where commenters declare confusion. First, the caveats. Second, some info about ...
user avatar
  • 457
6 votes
Accepted

Views Proximity Search on Latitude / Longitude

We've done this with OpenLayers https://www.drupal.org/project/openlayers and Openlayers Proximity https://www.drupal.org/project/openlayers_proximity I wrote a blog article which in part describes ...
user avatar
6 votes

Use Drupal views to generate contact Reports in Civicrm

If you prefer a solution which is editable via a web GUI, then Drupal Views are a great flexible approach. We use them extensively. You may hit the occasional limitation (either a "Views-ism" or a ...
user avatar
6 votes
Accepted

Adding Case Role to CiviCRM Cases Views

Actually you'll need to start with a CiviCRM Relationships View. If you start with a view of CiviCRM Cases, you may get bad data if they have multiple open case types with different case managers. ...
user avatar
  • 1,811
6 votes
Accepted

Use Drupal Views to select Organisation and display contacts with a particular relationship to Organisation

To create a Drupal relationship in a View for contacts A - B or B - A you need to add 2x Drupal relationship. In the case of starting with the Org assuming it as at the B end of the relationship, ...
user avatar
  • 27.2k
6 votes

Prefill webform with civicrm activity data

Below please find some screenshots to illustrate how to do this: 1. This is a View of Activities. Each Activity has an Update button [that's a Global: Custom Text field -> Text Update; Rewrite ...
user avatar
5 votes

How to create a Drupal View with multiple CiviCRM relationships?

This is an update to the answer given by petednz - fuzion. In my case I needed to create a view which showed a list of all employees of the organisation employing the currently logged in employee. In ...
user avatar
  • 837
5 votes

How to create a Drupal View with multiple CiviCRM relationships?

I am not sure from the question whether each relationships is connected to the original contact, or if some might be daisy chained eg Parent to Student to School etc. In case it is the latter, here is ...
user avatar
  • 27.2k
5 votes
Accepted

Duplicate entries in Views

The culprit is often the website field which has no filters that enable you to specify which of a number should show and hence they produce multiple rows. But like others say, it could be Address, ...
user avatar
  • 27.2k
5 votes
Accepted

How do I create a Drupal View to display last activity date.

All right...I did it but just wanted to follow up. Expand Advances in the View UI, click next to Aggregation on the word No. Turn it on. Now Add the Scheduled Activity Date field. Click Apply, ...
user avatar
  • 1,811
5 votes
Accepted

Error from CiviCRM code when I try to install other Drupal modules

It looks like CiviCRM is trying to insert some "Managed Entities" which already exist in the DB. Certain actions within the Drupal CMS will trigger CiviCRM to attempt this, and enabling / disabling ...
user avatar
5 votes

How to show Users their Membership status so that even users without a membership status get to see the block

I believe you can connect your civiContact view to the membership fields without using that smart group. I have had success (in views 3) in the past with a civiContact based view using a relationship ...
user avatar
  • 1,489
5 votes
Accepted

Drupal Views - Show "Contribution" + Drupal User fields

Nevermind, figured it out - had to create a Relationship to CiviCRM Contacts: Drupal ID. Issue resolved.
user avatar
5 votes

How can I bulk update a collection of recurring contributions to set the next scheduled contribution to a specific date?

Since yesterday you can now do that if you're using Drupal! @jackrabbithanna (Mark) added some code to CiviCRM Entity Project, which now exposes civicrm_contribution_recur as an Entity in Drupal so ...
user avatar
5 votes
Accepted

Views: Filter results by current logged-in user

Found it! To limit views results to the current user, you want to: Create a relationship Go to Advanced > Relationships > Add 'CiviCRM Contacts: Drupal ID' Add the filter criteria User: ...
user avatar
  • 609
5 votes

Why have all my custom Civi fields stopped showing up in Drupal view?

In most cases this is fixed by running drush cc all. I don't know what the circumstances are that causes the upgrading 'clear caches' to not suffice but this seems to be the fix. If 'Clear Caches' ...
user avatar
  • 27.2k
4 votes
Accepted

Is there a way to add a custom field to the Inbound SMS activity type?

How about adding another activity status? Like "Unread" or "Read". Depending on how skilled you are, maybe it is possible to have inbound sms set to "Unread" as default. Then your staff could change ...
user avatar
  • 2,231
4 votes

Duplicate entries in Views

Why this is happening depends very much on how your View is set up, providing an export of the View might help us investigate. One thing that might help is turning on the 'Distinct' option in the ...
user avatar
  • 1,917
4 votes

How to display a Drupal view in a CiviCRM tab

Extrapolating on Coleman's answer, you can get the json output required by creating a new Drupal page with hook_menu. Here is the full code: function mymodule_menu() { $items['civicrm-videos/%user/...
user avatar
  • 141
4 votes

How could I use CiviCRM for sponsorship

I'm not sure how the "things" would fit into this model, but I might begin to tackle the child/person sponsorship this (Drupal-specific) way: Create a custom field for individuals (and/or potentially ...
user avatar
4 votes

How do I add a currently unsupported field to Views?

You will need to add the field manually to: drupal/modules/views/components/civicrm.core.inc and then submit a PR to civicrm-drupal repository, so the fix gets merged into the main code base. In D8,...
user avatar
  • 3,803

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