Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module allows you to export data from your Drupal site as vCards. You can create views that collect information from users or other entities, and then present this data as downloadable vCard files, either individually or zipped together.

Overview

This module aims to provide a vCard attachment for views in a similar way as the views built-in feeds system does. With the flexibility of views, these fields can come from a user, node or referenced entity. After assigning the fields to their vCard properties, this data can be presented in a downloadable vCard.

Basic concepts

This module is based on the way the views module builds RSS and XML feeds. By selecting several fields from a (user) entity and assigning them to specific vCard fields, a complete vCard can be constructed.
When the view contains one vCard, it is delivered as it is. When a view contains multiple vCards, they get zipped before the download starts. This also works for exposed filters.

For the 3.0.0 branch I've tried to stick as much as possible to the vCard 4.0 standard. If you however want to use the 3.0 or 2.1 standards for compatibility reasons, you are able to override the views-vcards-view-row-vcard.html.twig template and make changes where needed.

Installation

Install this module using composer to also get the right zipping library.

Configuration

  1. Create or edit a View showing users (any entity will do, but users make the most sense), then create a new display of type 'vCard'. In this display choose vCards for both 'Format' and 'Show'. The Show settings dialog will allow you to select which field should be used for each vCard property.
    • Make sure the fields you want to use are added in the fields section,
      otherwise they will not show up.
  2. Views vCards offers the 'attach to' option under vCard settings, allowing this module to add a download link to another display. You can for instance set up your user list view as normal with all (exposed) filters if you require them, attach the vCard display to this and the vCard export will adapt to the set filters and provide the right vCards.

Be careful with the display of usernames or email addresses in vCards and double check who has permissions to access the view because it could lead to information disclosure.

Common pitfalls

  1. Since Drupal 9.2 there is a permission to allow users to view other user's email addresses. Please refer to this change record: https://www.drupal.org/node/3070293. Having the permission disabled makes that no email addresses are included in vCards. Alternatively you can choose not to use the user's system mail address and use a separate field for it instead.
  2. To avoid vCards with embedded images becoming very large, make sure to apply an appropriate image style to the image field.
  3. When you see strange characters in the generated files, please check if the field is not being output as link.

Dependencies (Drupal 7)

Activity

Total releases
1
First release
Jun 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
3.1.1 Stable Jun 23, 2025