Adding a Drupal Webform to the Event Content Type

Have you ever wanted to add a signup form to your free events? The Webform module, which has been around Drupal for a while is a great option. The following is a simple recipe of modules and configuration that will allow you to add a signup form to your event content type ... or any other content type of course. The following steps assume you are logged into a default Drupal7 site.

Event Content Type

  1. Click on Structure in the black menu bar across the top of the screen.
  2. Click on Content types > Add content type.
  3. Create the event content type by completing the form. Add additional fields such as a location and date is you want.

Note: We will return to this content type to finish its configuration.

Webform Module

  1. Install and enable the Webform module.
  2. Configure the Webform module by checking the Event content type from the list of content types on the configuration page.
  3. Save

Signup Form

  1. Click on Add content in the gray shortcut bar.
  2. Click Webform.
  3. Title the node Generic Signup, turn off comments if you want to, and Save.
  4. Add the components you want for your signup form and configure the form using the configuration options provided by the Webform module.
  5. Make sure you save.

Webform Template Module

  1. Install and enable the Webform template module.
  2. Click on configure next to the module on the module list.
  3. Select Event for the template destination.
  4. Select Webform for the template source.
  5. Save

Note: This configuration is not the only way to do this. It's just what you need for what is being described in this blog.

Field Group Module

  1. Install and enable the Field group module.
  2. Go to Structure > Content types > Manage fields for the Event content type.
  3. Add a new field group labeled Sign Up and set to fieldset.
  4. Drag the Webform template (that already appears in your list of fields) to be a child item under the group.
  5. Drag the group to a position of your choosing.
  6. Save
  7. Click on Manage display tab at the top of the Manage fields page.
  8. Position the Sign up group to a place of your choosing. Consider the Div format but that's your choice.
  9. Save

Event Node

  1. Click on Add content > Event.
  2. Create an event.
  3. Select the sign up form from the template list.
  4. Save.