New Possibilities with Webform Integration

Veröffentlicht
2011-10-16 14:43
Written by
I've just released the stable 2.0 version of the Drupal Webform CiviCRM Integration module and wanted to share some of the cool new things you can do with it. Version 1, which I wrote earlier this year, was basically built for a single purpose: you could have a user fill out a webform, and their contact record (name, address, email, etc.) would be created/updated and an activity of the form submission would be logged. That alone is pretty darn useful, but suggestions from users, the advent of API v3, and a commission from the core team got me setting sights higher for the next release.

New Features in Version 2

  • Handling multiple contacts and contact types

    Instead of processing a single contact per form submission, you can now have as many contacts on the form as you like, and they don't all have to be individuals. A simple use for this would be to allow a person to fill out their own information and their employer's on the same form.
  • Working with multi-valued core and custom fields

    Each contact on your form can now have multiple addresses, phone numbers, websites & emails. You can also share addresses between contacts. And multi-valued custom fields are supported as well.
  • Supporting campaigns

    If you're using the new CiviCampaign component, you can now specify a campaign for activities and events.
  • Creating relationships

    Since you can enter multiple contacts per form, why not create relationships between them at the same time? You can specify the relationship type in advance, or expose it to the form for users to select.
  • Opening and updating cases

    You can now create webforms that open a case, or add an activity to an existing case.
  • Handling event registration

    You can register multiple contacts for multiple events on a single webform. They can all be signed up for the same event(s), or register for different events. Sorry, collecting payments via webform is not currently possible.

Usage Ideas

Fancy RSVP Form

Often people want to sign up multiple people at once for an event. Webform integration can make this very slick -- send out a hashed link to the RSVP webform, and users will find their own contact details already pre-filled. You can use webform_conditional to allow them to say how many friends they're bringing, and then show/hide the right number of fieldsets with no page reload. And why not create the relationships between them while you're at it? You can expose the relationship types you want to the form to let them pick from, say, "friend, colleague, spouse, etc" for each person. Also, the same form could allow people to RSVP that they are not coming to the event (I remember hearing that feature request on another post recently), by exposing the "participant status" field to the webform, creating a new status in civicrm for non-attenders, and then configuring that field to show just the choices you want, with appropriate labels. So "Yes I'm coming" and "Sorry, can't make it" would be what the user sees, and it would go into CiviCRM as either "registered" or "non-attender" status. While you're at it, redirect those non-attenders to a contribution page after they submit the form, so they can still support your cause even though they're not coming in person!

Team Sign Up

You could make a form that lets the user enter an organization-type contact for their team, and specify sub-type on the form, i.e. football, lacrosse, hockey. They could then enter all the players' names, and the form submission would automatically create relationships between player and team, and the teammates with each other. It could also add them to a group so they get your email announcements, and tag them as current players.

Self-Serve CiviCase

Say your organization provides services, and tracks them using CiviCase. And say cases are typically opened or updated when a person requests a service. Enter Webform CiviCRM... Create your service request form with the usual name and address fields, then configure your case/activity options: Choose the appropriate case type, and set the status to "ongoing". Choose an activity type like "service request." When the user fills out the form, a new case will be created, and the service request activity will be added to the case, containing whatever details they specified. If a case of that type is already open for that person, then the activity will just be added to the existing case.

Even More Usage Ideas...

If you've been using this module already, I hope you'll add to this list in the comments:

Comments

Lucas Weeks (nicht überprüft)
2011-10-17 - 08:07

Nice work! This is excellent stuff. Thanks!

You mention above that "collecting payments via webform is not currently possible." I've been working on that precise problem, and I released the uc_webform module last spring. It allows you to include ubercart products within your webform. We've been using the webform module to collect event registration information, and then directing people to checkout using ubercart. With webform_civicrm, we'll be able to continue doing that, except now the contacts will go directly into civicrm. A big win for us.

Thanks again!

Hi,

Sounds like a super useful addition, well done!

Specifically interested by the RSVP, does it handle a checksum token to fake a login/pwd or does it expect the users to be logged in?

X+

Just wanted to let people know that after much searching I've finally found a way to mimic the behavior of Civi profiles on webforms in regards to selecting a state/prov based on chosen country, using jQuery AJAX. Look for that improvement in 2.1.

This module solved a problem I've been avoiding for years, and it worked brilliantly.

http://www.taxfairness.ca/action/tell-harper-support-financial-transaction-tax-g20

It uses webform integration to collect names/postal codes/emails of new supporters while doing some simple advocacy support for the organization's cause.

I also used the hash trick to generate links to send out in Civimail so that the existing constituents had their stuff prefilled and we didn't have to worry about deduping stuff later.

Thanks colemanw!

This module makes it so easy to set up CiviCRM-integrated forms. Amazing.

 

Thanks!

If you're setting up a form with lots of contacts, you'll be glad for the new "clone" feature which keeps all your fancy form customizations intact when adding a new contact. Look for it in the current -dev and the 2.3 release when it comes out.

Also in -dev/2.3 is the abilitiy to work with registration limits for events.

Anonymous (nicht überprüft)
2011-12-22 - 00:26

Great work. 

The civicrm profiles have a limitation that we cannot have two contact types(organization and inidividual) in same profile. This was a limitation for a long time. But now this module has helped overcome it.

The way this module is improving with each release indicates that there are a lot of cool features coming up.

Thanks for this module!

I was curious if there is a way to do a particular task (and if not, to offer it as a feature suggestion):

I am setting up a form for a particular event registration including two contacts -- the person registering and a field for the organization they work for. Ideally I want them to be related to this organization after filling out the form. However, this form is only for specific organizations which are already in CiviCRM. It would be nice to just give them a select list to choose their organization from and have it entered consistently so they are associated to the right org in CiviCRM. I tried to edit the field for the organization name after it was added to the form to change it from a text field to a select list but it doesn't seem to allow to change the widget type (or I'm just missing it). I was going to add the list manually as a select dropdown, but I suppose it would be cool for a future version to automatically create a select dropdown from orgs within a particular group, etc.

What do you think?

Gerhard (nicht überprüft)
2012-02-01 - 12:25

1st: I appreciate the cool module you provided for webform/civicrm integration.

2nd: I am somehow "blocked" :-( how to collect a newsltter subscription in the drupal webform module for civicrm on a public drupal site that allows us to send the newsletter only to users who have opt-in (with a radio-box form field?)

a custom group is collected in the webform and I can start a mailing out of civicrm only to this group (users are stored with this group assigned to them after they have submitted the webform) but I cannot manage a mailing group with my newsletter opt-in radio box in the webform.

Thx for any "erleuchtung",
Gerhard

I have solved it: new group in CiviMail -> Select Group(s)(hidden) in Webform and checked my new group "Newletter". Works like charm :-)

Thx for the great Module!
-G