RNG Contact: Anonymous registrants for RNG

Notice: this article make use of features introduced in RNG 1.3. Upgrade before proceeding.

Notice: RNG 1.3 not out as of this writing

RNG Contact provides a new person type for RNG. It allows you to create and reference a non-user, a task an anonymous user is normally required to do. Users of Event Registration for Drupal 7 know this feature as anonymous registrants.

Technical background

RNG requires that all registrants for a registration are a Drupal entity. Since anonymous users do not correspond to a user entity, this module provides a way to create an entity in similar fashion to how contacts work on your phone.

Installation

RNG Contact can be found on Drupal.org: https://drupal.org/project/rng_contact. Install the module as usual:

Drush

drush dl rng_contact && drush en rng_contact --y  

Drupal Console

drupal moi rng_contact  

Composer

composer require drupal/rng_contact  

Configuration

Enable the entity type for RNG

Enable RNG to use the Contact type provided by RNG Contact in the main RNG settings form (/admin/config/rng/settings)

RNG Settings

Enable the entity type for Courier

Enable RNG to use the Contact type provided by RNG Contact in the main RNG settings form (/admin/config/rng/settings)

Courier Settings

Create a contact type

Similar to how content types work for nodes; you must create a contact type (/admin/structure/rng_contact/contact_types)

Add contact type

The only field which comes with all contact types is the label field. After you create your contact type, you may want to add fields you want to display on contact creation forms, such as an email address field.

Enable the contact type for your event types

After creating your contact type you need to choose whether you want to allow new registrations to access existing contacts, and/or allow new registrations to create new contact types inline. I recommend enabling only the "Permit inline creation of entities" checkbox.

Enable people types for your event types

Permissions

You must grant permissions to roles so users can create new contacts.

rng_contact permissions

Registration form

This is what you should expect to see on your event registration forms.

Registration form

The new contact type appears as an option in "Person type", and the form to create your contact appears adjacent.

Enabling emails

For RNG to be able to send emails to contacts, you must add an email field and configure Courier to use this field. See the guide: RNG Contact: Adding an email field