Sending an email to a target when signing a Petition

Published
2013-07-19 09:27
Written by
jamie - member of the CiviCRM community - view blog guidelines

With the 4.3 upgrade, the Progressive Technology Project has made a number of important steps toward breaking out our work into pieces that others can use on their sites. This blog will begin a series of (hopefully) weekly blogs outlining new functionality that others can use.

Our first blog features the civicrm_petition_email Drupal module. Thanks to the hard work of agh1, a Drupal 6 version of the module is available (https://github.com/agh1/civicrm_petition_email). We just finished porting it to Drupal 7.

For the impatient:

 git clone git://git.progressivetech.org/powerbase/civicrm_petition_email

 git checkout 7.x-1.x

With this module enabled, there are a few new checkboxes on the petition form that allow you to specify the name and email address of a target that should get notified every time the petition is filled out. In addition, you can optionally specify a field in the petition that should be used as a custom message to the target instead of the default message (which is also configurable).

Enjoy!

 

Filed under

Comments

This seems like functionality that should be considering for integrating into core in a future release. What do others think?

Hey,

Is there a reason you did it as a drupal module instead of a civicrm extension?

dgg, +1 in the could be in the core front

X+

2013-07-19 - 13:14

I would have done it as an extension - however, someone already created the Drupal 6 module, so we decided it would be easier to upgrade it to Drupal 7. Of course, it took a lot longer to upgrade than expected, and most of the code is Civi code anyway, so in retrospect, I think I could have put it out as an extension in a similar amount of time. Lessons for next time...

2013-07-22 - 09:38

Yeah I did the Drupal 6 one for a client in the pre-extension days.  Extensionifying it has been a to-do item for a while, but other pressing things kept coming up.  Thanks, Jamie, for building upon it, and maybe this would be a good pre-CiviCamp sprint item for adding to core.

Anonymous (not verified)
2013-07-22 - 14:47

Looks good but when I downloaded it via git above the version is 6.x-dev

Anonymous (not verified)
2013-07-22 - 14:50

The git clone command above downloads 6.x-dev

2013-07-23 - 08:03

I inherited the git repository with master pointing to the Drupal 6 version. Following Drupal conventions, the Drupal 7 version is in the 7.x-1.x branch:

git checkout 7.x-1.x

I'm updating my blog now...