CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Adding groups to membership form
Pages: [1]

Author Topic: Adding groups to membership form  (Read 739 times)

karlg

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: 7.15
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.17
Adding groups to membership form
October 15, 2012, 05:48:10 pm
Hello,

(Please excuse this newbie question if it's really obvious!!)

My organisation is grouped into branches - you are a member of the organisation through being a member of a branch.

I need the membership form to allow a person to select the branch they want to be a member of.  At the moment, the branches are set up as groups, but not all groups are branches.

How can I add branch selection to the membership form?


Thanks in advance!!

Karl

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding groups to membership form
October 15, 2012, 10:47:25 pm
Kari,

This can be achieved with some amount of custom coding. I would suggest following:

1. Include profile with Group field on your membership form.
2. Use buildForm hook to unset groups which are not branches.

This way users can select groups which are branches.

HTh
Kurund
Found this reply helpful? Support CiviCRM

karlg

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: 7.15
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.17
Re: Adding groups to membership form
October 15, 2012, 11:48:07 pm
Thanks for that Kurund!!

Unfortunately, I have two problems:

- The user should be able to select only one branch (mutually exclusive).

- I don't have the developer skills to use a hook..

Is there any other way?

Should I be structuring the data differently?  Smart group, tag etc?  The trouble is that I think it has to be group-based because some branch members are branch officers and need access to their branch data, and this seems to work well having branches/groups synchronised to Drupal OG groups, and having other groups as administrators of each group...


Regards,

Karl

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Adding groups to membership form
October 16, 2012, 08:42:04 am
Hi Karl,

If I understand your issue correctly, I think the way to handle this is to create a custom field "branch" with radio buttons.  Add that to the membership form, and let the user select one.  Then create smart groups based on the custom field.  This should give you the UI you want without custom coding, but also allow you to make use of groups for syncing to OG.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

karlg

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: 7.15
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.17
Re: Adding groups to membership form
October 17, 2012, 03:59:32 am
Thanks!  I'll give it a try!

karlg

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: 7.15
  • MySQL version: 5.1.65-cll
  • PHP version: 5.3.17
Re: Adding groups to membership form
October 27, 2012, 04:33:28 pm
Hi,

I have now implemented smart groups so a member can select via radio buttons the branch they want to belong to.
Thank you.


The next question:

How do I link/synchronise that with branch organic groups membership in the Drupal side of the site?

Thanks in advance!!

Karl

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Adding groups to membership form

This forum was archived on 2017-11-26.