This Drupal 7 tutorial describes how to set up a calendar of upcoming events with the option of signing up for events.

This tutorial is based on this Drupal 6 version of these CCK Signup configuration steps, written by tvn.

  1. Creating Calendar of upcoming events.
  2. Setting up sign-ups for events.

Creating Calendar of upcoming events in Drupal 7

You will need the following modules:

To begin:

  1. Download, install and enable listed modules:
    • Advanced Help
    • CTools
    • Calendar
    • Date (Date includes: Date All Day, Date API, Date Popup, Date Repeat API, Date Repeat Field, Date Tools, Date Views)
    • Views (includes Views UI)
    • Configure the site Date/Time settings by navigating to these two admin pages:
      • Administration > Configuration > Regional Settings
        (http://example.com/admin/config/regional/settings)
      • Administration > Configuration > Date and Time
        (http://example.com/admin/config/regional/date-time)
  2. Create new content type "Event" by navigating to Administration > Structure > Content types > +Add content type (http://example.com/admin/structure/types/add) with the following fields:
    • Name : Event
    • Machine name : event (automatically created from the Name).
    • Title field label : Event name
    • Save the new content type
  3. Add a date field to the Event content type:
    • Go to the Content types administration page (Administration > Structure > Content types http://example.com/admin/structure/types/) and click the "Manage fields" link next to the Event content type.
    • Add a new field with these settings:
      • Label: Event date and time
      • Field name: event_datetime
      • Field type: Date
      • Widget type: choose the Select list, Pop-up calendar or Text field, as you prefer
    • Save the new field settings.
    • On the next page you will see more detailed settings for the Event date and time field. Choose whichever options suit your site and Save settings.
  4. Configure calendar view:
    • Go to the Views administration page (Administration > Structure > Views or http://example.com/admin/structure/views).
    • Click +Add view from template at the top of the Views page (http://example.com/admin/structure/views/add-template).
    • Click add on the Calendar template line described as "A calendar view of the 'field_event_datetime' field in the 'node' base table.".
    • Set the View name to 'Events Calendar' (the machine name should be 'events_calendar'.) and click Continue.
    • Configure calendar month view in this way:
      • Title
        • Title: None
      • Format
        • Format: Calendar
        • Show: Calendar Entities
      • Fields:
        • Content: Title
        • Content: Event date and time
        • All other fields which you would like to display on the calendar for you event.
      • Filter criteria
        • Content: Published (Yes)
      • Sort criteria:
        • Content: Event date and time - start date (asc)
      • Advanced > Contextual filters:
        • Date: Date (node) (Content: Event date and time - start date (field_event_datetime))
      • Click Save to keep all your calendar settings.

Setting up sign-ups for events

You will need following modules:

  1. Download and install listed modules.
  2. Create a new content type "Signup" by navigating to Administration > Structure > Content types > +Add content type (http://example.com/admin/structure/types/add) with the following fields:
    • Name : Signup
    • Machine name : signup (automatically created from the Name).
    • Title field label : Registrant's name
    • Click Save and add fields
  3. Add the event reference field to Signup content type:
    1. Go to the Content types administration page by navigating to Administration > Structure > Content types > +Add content type (http://example.com/admin/structure/types/add) and click the "Manage fields" link next to the Signup content type.
    2. Add new field with next data:
      • Label: Signup for event
      • Field name: eventref
      • Field type: Node reference
      • Widget type: Reference from URL
    3. On the next page you will see more detailed settings for the field.
    4. At the bottom of the page find "Content types that can be referenced:" and make sure Event content type (the one we created earlier) is checked.
    5. The rest of the settings configure how you think is best for your site. For example it could be something like:
      • Fallback behavior: Display page not found error.
      • Referenceable node links:
        Create link on the teaser view
        Create link on the full view
      • Link title: Signup for this event
      • Return path: The referenced node
  4. Set up signups for Event content type:
    1. Go to the Content types administration page Administration > Structure > Content types (http://example.com/admin/structure/types/manage/event) and edit your Event content type.
    2. In the node settings you will see new section "CCK Sign-up":
      • Enable Sign-ups for event nodes.
      • "Node reference field to associate sign-up nodes" set to "field_eventref". (Event reference field you created earlier)
      • "Date field to associate with sign-ups:" set to "Event date and time". (Date field you created earlier)
  5. Check user permissions for the content types and fields which you created:
    1. Go to the Permissions administration page Administration > People > Permissions (http://example.com/admin/people/permissions).
    2. In node module check permissions for event and signup content. Specify which users can create/edit/delete these content types.
    3. Don't forget to configure other node-related modules you are using. Such as Path auto, Node access etc.
  6. Create view to display list of signups on the event page (this view will be attached to the Event node using the EVA module):
    1. Go to the Views administration page (Administration > Structure > Views or http://example.com/admin/structure/views).
    2. Press +Add new view
      • View name: Signup list
      • Show: Content of type: Signup sorted by: Newest first
      • Uncheck: Create a page
      • Click Continue & edit
    3. On the next page configure options as follows:
      • Format: Table
      • Fields. As fields choose all the information you want to show. For example user name (author of signup), custom fields of Signup content type, some fields from user profile etc. To make signups' management easier you can also add Node: Edit link and Node: Delete link fields.
      • Filters:
        • Content: Published (Yes)
        • Content: Type (= Signup). Filter options set to "is one of" "Signup".
      • Advanced > Contextual filters:
        • Content: Signup for event (field_eventref).
    4. Finally at the top left of the View Displays panel, click +Add > "EVA Field" and press add display (if you don't see EVA Field option - make sure module Entity Views Attachment (EVA) is enabled).
    5. You will see new view "EVA Field" appear in the list of Displays. Choose this view and in its settings find section "Entity content settings".
      • Entity type: Node
      • Bundles: Event
    6. IMPORTANT: After you have created some event and signup content, you may need to Clear all caches (Administration > Configuration > Development > Performance or http://example.com/admin/config/development/performance) in order to see the attached view on the Event node view.

    Note: Node field Title is required for all nodes, including signup. If you don't want your users to fill this field, you can use Automatic Nodetitles module, which will automatically create node titles and hide them from users.

Comments

micheas’s picture

The link to http://drupal.org/project/views_attach is clearly wrong as there will never be a d7 version of that module.

I generally cannot get this to work.

It also is an overly complicated use for showing the basics.

This article assumes that you have the basic functionality of cck_signup working.

Overall, useless as documentation of cck_signup, but probably useful if once you have cck_signups working.

cmseasy’s picture

The first line on the views attach page has a link to eva.

Composer is a tool for dependency management in PHP (see https://getcomposer.org). It is not a website development tool.
Allow webbuilders using to choose their own building strategy. Do not require composer for webdevelopment or production websites.

kenyan’s picture

This is good documentation.
Would you care to go the extra mile on Group Signups? If not, I can help out.

halmashossain’s picture

I am facing problem in giving user permissions. That means I can give permission but not properly.

Would you please mention which modules need which permissions?

I gave "Bypass content access control " to authenticated user. So authenticated users are able to add/edit/delete event. Without this option "Register to this event" link is also not found.

Looking for the help.

Thanks in advance.

robotsguide’s picture

when setting up sign ups, I get stuck at #4.

when I enable cck sign up on the event node and click save content type I get a 500 error. Any ideas why this would be happening? there are no messages about it in the DB log or the website's log.

mesj’s picture

Hello,

I am having the same error and my log is also empty.

Does anyone knows a solutions for this annoying error?

Thanks,
Jan

jwoolson’s picture

I'll retrace my steps and see if I can spot a possible cause of the 500 error.

stachu’s picture

Can i block join to event if event has closed? I'm thinking about it but i can't do this. If anyone help me i'm waiting :)

beto_beto’s picture

can i restrict the number of user who can register on this events as example ??

richrmoore’s picture

I don't see anything new posted here so wonder if this is still a viable mod, but anyway...

Total newb here. I followed this tutorial to try to set up event signups and was successful to an extent. I could never actually create a signup so tried adding in Entity Registration. Now I have a signup stuck somewhere in a database I can't find nor see, but that one signup keeps me from changing certain elements. Also, I'd like to delete some stuff and start all over again, but the Event and Signup content types I created using the tutorial do not have a "delete" link. Is there any way to delete them??? At this point, the only way I can see to start over is to uninstall Drupal then reinstall it, losing some of the other stuff I've set up so far.

It's tough being a newbie.

So 2 questions...
1) Where can I find/see the signup data?
2) How can I delete the Event and Signup content types created using this tutorial so I can try again?

Thanks for any help!
Richard