Can the "Membership requests" option be set to open by default?
Aaron Stanush - May 1, 2009 - 16:35
| Project: | Organic groups |
| Version: | 6.x-1.3 |
| Component: | og.module |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
When a user is creating a new group, under "Membership requests" there is the option to choose whether the group is open, moderated, invite-only, or closed.
Is there a way to disable this choice for users? For example, if I am creating an open-community website, I would want every new group created to be open. Or at least, low-level roles would never see this option and the group would be open by default.

#1
you can achieve this using hook_form_alter on the node form and change the radio field to a value field with you wanted default value.
#2
I really need this, cause the approval method for a requester user is too confusing....
how can I use hook_form_alter?
#3
Use of hook_form_alter is done through the creation of your own "helper module" if I may use that terminology. Your module will be only waiting for a specific situation to occur. For instance, your module can waiting for a form do display in node/add or node/edit mode and than you can set some default values and maybe even turn the value into a hidden form value or disable the field after setting the desired default value.
Follow this link for more information about hook_form_alter:
http://api.drupal.org/api/function/hook_form_alter/6