I know this is on the to do list. I wanted to emphasize that I think this is an important feature that should be developed and moved along as soon as possible. It would be great if the module maintainers could post comments on this thread to show progress so those interested in this feature could subscribe to updates. Thanks!

Comments

johngriffin’s picture

Hi, I'm interested in collaborating on this, please let me know if any code already exists?

TallDavid’s picture

Issue tags: +CiviCRM

Is there any chance the CiviCRM integration will be usable for the 2010 campaign season?

johngriffin’s picture

StatusFileSize
new3.65 KB

Hi, I've attached the code which we wrote to insert activism sign-ups into civicrm as activities.

It's a bit messy and has some values in there which are specific to our use but hopefully we'll be able to clean it up a bit. There are two functions, which may be renamed and moved to another module as they do not implement hooks:

/**
* Generate a CiviCRM contact for use with the ativity we will register later
*/
function activism_get_civicontact($email, &$form_state )

/**
* Create a new activity record in civicrm
*/
function activism_civicrm_create_activity( &$form, &$form_state )

At the moment we're simply calling activism_civicrm_create_activity() in the submit handler of a custom module called activism_appeals but if this doesn't make it into activism module then it's probably best to create your own module, use hook_form_alter to add a custom submit handler to the activism sign up form, and call activism_civicrm_create_activity() from within that submit handler.

joe-b’s picture

StatusFileSize
new3.1 KB
new39.94 KB

I've done a load of work to improve the integration of the module with CiviCRM, and to make Activism more 'international' - collect countries in the petition form, allow states/provinces other than US states. With CiviCRM, all the countries and provinces are available in the CiviCRM database, so I've amended Activism to access these, and to use AHAH to update the available states.

I've also changed the content type name to 'activism_campaigns' - 'campaigns' is a rather generic name, already used by an existing CCK custom content type in my case.

I've taken @johngriffin's advice and dropped some of the extra CiviCRM stuff into an extra custom module (activism_petitions) - this really ought to be integrated into the main Activism modules, if acceptable. I've also taken out his own specific code and generalised it by adding a config field to select the Activity type from those available in CiviCRM directly.

I submit the work here for review.

The changes I've made have some knock-on effects - by adding in countries and selecting provinces accordingly, the tool needs to have access to all the country > province data. That's fine if CiviCRM is available, but is a problem otherwise - I guess that data is covered by the CiviCRM user licence, so there may be options to make use of it in Activism module.

meecect’s picture

+subscribe

Neil Adair’s picture

I've tried this out and it works well. I'm wondering why the use of CiviCRM "activities" as it is more common to use CiviCRM "groups" for this type of function. Groups are the basis for CiviMail and CiviCRM forms have the option of adding the users to groups.

dangrice’s picture

Hey Joe,

I installed the two modules but the email confirmation and page redirect settings aren't holding their values. Are they on yours?

-Dan