1

We're a political organisation running CiviCRM 4.6 looking to make public campaign pages about local issues.

On these pages a site visitor should be able to: - Enter their name, postcode, email address - Often fill out a personalised message - Opt in to a mailing list on this campaign

With all this data being stored in Civi.

This feels like a CiviPetition, although I am struggling with the implementation.

  • Is it possible to have a checkbox in a CiviCRM Profile/Webform that, if selected, will add someone to a Mailing List Group?

I assume something is possible with Rules but I do not want to have to make custom rules for each webform. Trying to make creation of new petitions/campaigns as easy as possible.

2 Answers 2

3

Yes. You can add "Groups" as a field to a CiviCRM Profile. There's similar functionality available on Webform.

If you use profiles, only groups with the Visibility setting of "Public Pages" will be available for the petition signer to click. If you use Webform, you can modify the widget to show a specific set of groups for that webform.

Note that the profile implementation has a limitation - if someone a) fills in a profile that has the "Groups" field, b) is already in your database, c) is already a member of one of the public groups, and d) does not check off the box for that group, they will be REMOVED from the group.

If that last part is a problem, and you're up for writing a custom extension, you can see a quick and dirty implementation I wrote to handle this exact scenario on Github.

1

It sounds like you are using Drupal. In which case, via Webforms integration, set Groups (on Contact 1 presumably) to 'user selects. Then in the webform component, edit Groups and select only those Groups you want listed and configure so they show as checkboxes. That should get you what you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.