Adding "ONLY ONE" of selected organic groups to be Mandatory

adshill - October 21, 2007 - 12:00
Project:Organic Groups - Multiple Mandatory Groups by Role
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

Firstly thanks for the module, its a nice development on the mandatory group theme.

I'm not sure if this is something that everyone would need but would it be useful to add the following functionality - I'll use my example as demonstration.

I am developing a social networking site that has two group types, one are "Action Groups" and the other "National Groups" that are the central place for Action Groups of a specific country. Each new member only has to join one of the "National Groups" but can add and join multiple "Action Groups". For this reason it would be great to add the ability to have new users in registration to choose ONLY ONE of the National Groups that is mandatory rather than the current "at least one" settings. This would then be a drop down menu instead of having loads of check boxes on the registration page. Then the National Group admin could recieve a mail when the user joins their group in order to deal with them individually.

Your thoughts and feedback on this would be great.

#1

rconstantine - October 22, 2007 - 02:04

I take it you meant to have your suggestion as an option. I'll leave this issue open for when I get around to updating this module, but for now, you could easily modify the code to suit your needs. Search and replace the 'checkboxes' form type with 'radios'. Or, if I used 'checkbox' (note singular instead of plural), you could substitute either 'radio' or 'select'. You can't substitute 'select' for 'checkboxes' since they are built differently.

If I find several modules on a site need tinkering with, I either keep notes of the changes in a text file on the site, or I create a custom module for the site which indirectly modifies the modules I use. In this case, you would use hook_form_alter and change the checkboxes that way.

#2

adshill - October 24, 2007 - 19:52

Thanks, thats great. I'll play with the code and see how I get on. It would be a nice addition to the module but this also gives me a good alternative.

#3

rconstantine - October 25, 2007 - 18:30
Status:active» postponed

Marking as purple so it stands out.

 
 

Drupal is a registered trademark of Dries Buytaert.