Drupal 7 Entity Registration Module
Share with Others
The Drupal 7 Entity Registration Module makes it easy to host sign-ups or registration forms directly on your Drupal 7 website. This solution works great for event, conference, webinar, or training signup forms.
In this lesson you will learn:
- How to install and configure the Drupal 7 entity registration module
- How to connect an entity registration form to an Event content type
- How to configure permissions for the Entity Registration module
- How to send emails to all users that signed up for the event
Hello everyone and welcome to another Daily Dose of Drupal. Today we’re on Episode Number 167 and we’re going to be going over the Entity Registration Module. But before we get started I am Shane Thomas, you can follow me on Twitter at smthomas3, also make sure to head on over to codekarate.com and check out the EBook, look at some of the other post and videos and learn more about Drupal.
So if you ever had a situation where you’ve needed to allow users to sign up for a specific event or maybe it’s a conference, a webinar or a training, some type of event like that and you want to allow that to happen on your Drupal website. Well that is where the Entity Registration module comes in. It allows you to easily allow users to sign up for different events right on your site.
So we’re going to go ahead and get started and make sure you have this module downloaded if you’re following along and we’re going to go ahead and start by installing the registration module. We might break this video into two parts and this one I’ll just focus on just the registration piece but in a future video I’ll cover some of these other modules that come with the Entity Registration Module. Once we have the Registration Module on we can of course configure permissions.
By default there’s only a few administer permissions, you’ll notice here in a little bit this is going to change. Once you install the entity registration module there’s a menu over here for registration, it’s under Structure Registration. There are two menu items in there. One is Registration States which allows you to set up different statuses or states for a registration.
So by default you can see that a registration is going to be complete. You could have a pending state or a cancelled registration state as well. We’re going to leave this at the default we’ll just know that it’s there. Registration types is the next step in the process. Here you can add a registration type. In our case let’s go ahead and just call it a Training.
Let’s say you want to allow people to come to your site and sign up before a specific training at a specific date and time. You then are able once you create the registration type to change fields on this registration type. Now there’s two different places where you can change how this works. So the first is right on the actual registration type itself. So let’s go ahead and add a field, we’re going to go ahead and have them specify their name and we’ll have just this be a text field.
You can also then say you want to know what company they’re from so you want a field for their company information and you could of course add a whole bunch of fields. The important thing to keep in mind is anything you add in this registration type and is going to be displayed on every registration. So the user is going to have to fill this out every time they want to sign up for a training.
The next step is to create a content type that will then reference that registration type. So we’re going to add an Event Content type and the reason we’re just adding a content type called Event is because you may want to have different types of events. You may want to have trainings, you may want to have webinars, you may want to have a whole bunch of different types of events.
We’re going to keep everything really simple so we’re going to leave everything in its default. So we’re going to save that content type, if you can see there’s our Event Content Type. We have to link this content type to the registration type that we created. So we come into manage fields, we’re going to add a registration field here and we’ll just call it registration for now and I’ll leave registration type as the widget, click Save and click Save again. In this section you’re going to be able to specify the default registration settings.
So as you can see there’s settings that will be applied anytime and entity with this field is saved. So the capacity is the maximum number of registrants so you can select it if you want it enabled by default. You can specify the open and close date and you can specify reminder, reminder template, how many spaces are allowed for each registration or registrant and if you want people to be able to allow multiple registrations.
Here’s the from email address which defaults to the site email. So any emails that get sent for this registration will come from firstname.lastname@example.org. We’re going to leave all those at the default for now just to see how it looks and we are now able to create our event content type. So let’s go ahead and add an event. You’ll notice how there’s a registration field here for training and remember we talked we could have conferences, webinars, any type of event that someone would want to sign up for.
So we’ll create new event called Training Test 1, we’ll give it a little bit of text, select the registration we want which is we want a training event, we’ll leave everything else at its default and click Save. Now you’ll notice everything else looks pretty much the same as a normal node would.
However there is a Manage Registration tab here. If we click on that Manage Registrations tab it says there are no registrations. So if there were any it would show up here and there’s also a settings sub tab. Here is where we can click to enable registrations for this training so we’re going to click enable. How many people you want to be able to sign up.
We could set this to any number and it will limit the registrations to this number. You can specify the start and in times for when a registration should be open. So if you only want registrations to be open for a couple of days or a week or even a couple of hours you can control all that from here. So we could say it’s open from today until tomorrow. If you want to send a reminder you go ahead and just fill this out and we could send a reminder saying the event is about to start. If you had any links or anything else you could put that in here, you can also use tokens if you have the Token Module enabled and we’re going to leave the rest at its default then click Save. Now you’ll see there’s a new tab here called Register.
Here you can actually come in and register who is going to sign up for this training. So you can see if I want to sign myself up I can sign up another person. I’ll just enter the name and the company and click Save Registration. So now that we have this setup let’s look at the new permission that are available. You’ll notice when I start typing registration there’s a whole bunch of extra permissions.
The important ones are the ability to create new registrations and to register other people if you want them to be able to select a dropdown as you see here to either register it themselves or another person or another account if they know the user name for the account they want to register. In this case I’m going to use create new registration and register other people and I want to give that to authenticated users.
There is supposed to be a way to allow registration for anonymous users, however you may need to try out the development version and may need to do a little research which because I think there may be a bug or two in allowing anonymous registrations. So let’s go ahead and now that we save those permissions, go ahead and find another user here. Let’s go ahead and go to the site and I think I already had another user set up.
So I’m going to go here and I’m logged in as another user now as you can see I am non- admin. If I go through this training test 1 you can see here’s the text. It says this is a training registration test. You’ll notice there’s a field here, this is supposed to be a link but it doesn’t seem to show up so we can hide that but there is a register tab so if I click Register I’m able to see this is a registration forum myself for instance. You can register test 1 at Test Company and say that is myself so I can save the registration. It says the registration has been saved.
You can also register someone else if I want to and I just put an email, you can put test two, let’s go ahead and do that, give it a company name, save registration and it says registration has been saved. Now if we go ahead and let’s close that out of here. Go ahead and come back to the site and I click on Manage Registrations, you’ll see I see the two registrations here. Because we set up that reminder email that we’ll go ahead and be sent. However we can also send out an email at any time to everyone on the registration lists.
So we could put some text in here, this is going to go ahead and send an email to the two people that are on this list. So if I go ahead and open the email that I received, you should be able to see that the email was sent, just waiting for it to load here and if I pull in the email it’s going to look something like this. You get the email from email@example.com, it was sent to shane+test and this says thanks for signing up, here is the link to the event and then you could of course have whatever you wanted in that email.
So as you can see this is a really easy way to set up registration forms or sign up forms for various types of events on your Drupal site. There’s a whole bunch more you can do with it. This was the very basic example, next time we’re going to go over a few of the other modules that come with it. Talk about a few other things that you can do with it and learn how you can really get this to integrate a little better with your Drupal website.
Thanks for watching the Daily Dose of Drupal and make sure to check out codekarate.com, check at the EBook, follow me on Twitter at smthomas3 and we will see you next time.