Create a sign up form for your event

John Newton's picture
John Newton
 
 

We recently had a requirement to add a sign up form for a series of events. We've produced a number of bespoke solutions in the past which required a fair amount of coding but this use case was for a straightforward generic event registration procedure so it seemed obvious to turn to one of the standard Drupal modules to do this.

The signup module has been around a long time but this time we decided to use the newer Entity Registration module as it promised to do everything we needed and to be flexible and well-maintained. Here's a quick summary of putting an event form together - it really shouldn't take you more than a couple of hours from start to finish to have events, sign up forms, waiting lists, confirmation emails and registration listings on your site. So here goes: Install Entity Registration module - enable it and if want waiting lists, enable that part of the package too.

You'll now have a Registration menu item under your Admin | Structure Add a Registration Type. Let's assume you are running a series of webinars, in which case you might want to create a Registration Type of 'Webinar'. This works pretty much like any content type or fieldable entity, so just add the fields you need (name, company and so on) Now create a content type you want to use for registration. A good tip from Codekarate's video on this module is to create a generic 'Event' contet type so you can re-use this for other events as well as your webinars. Again, add the fields you want (date, url and so on) You will now want to add your registration form to your Event content type. Create a new field called Registration and then select Registration from the Field Type. You can set some default values here for your registration (for example, if you know your webinars will hold up to 20 you can set this here). Save your content type.

You're now ready to create your event!

Create a content node of type Event and make sure you set the value of your new registration field to Webinar. Once you save the node and view it, you'll see you now have a Manage Registrations tab available to you as admin on the node. Click this, anable the registration and refine your settings (for example, set specific dates for your events, manage email confirmation, wait lists and so on). Save your settings and you'll see you now have a Resgistration tab. You're almost there. Now, do you want members of your site to register or is this just for certain roles? You can see that there are permission overrides available for registration in the manage tab.

However, you might also want to enable or disable availability of these settings from the main Drupal permissioning settings if you want to extend management of the registration tool. A common use-case is to make registration available to anonymous users and this is a bit less intuitive but is easily done once you know how. Just make sure in your main Drupal permissions screen you have both 'Create new registration' & 'Register other people' set to true for anonymous users. Good to go? Well, it's an idea to refine your form a bit with something like CAPTCHA, so configure CAPTCHA to be available for your new form. You'll need to view source and grab the value of the form - for example 'registration_form' and then add that as a new element in your CAPTCHA settings. OK, now you're done!