Question : Drupal - How to alter default organic group form values?

I'm using Drupal with the organic groups module, and I've defined a content type that may be posted in a group, but on the node/add form, I want to set the default value to that user's group (as they can only belong to one) and set the type to "hidden".  I'm trying to implement a hook_form_alter, but I don't see how to manage the group form values.  Normally, I see all of the form fields and can override values (an example of which, is posted below), but when it comes to organic groups, all I see is this:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
    //output from print '<pre>'; print_r($form); print '</pre>'; 
    //This is what I see for groups.  I don't actually see 
      the select menu form field
    
            [#content_extra_fields] => Array
                        [og_nodeapi] => Array
                            (
                                [label] => Groups
                                [description] => OG audience & Public checkbox.
                                [weight] => 0
                            )
    
    //Normally, I see something like this:
        [field_attending] => Array
            (
                [#type] => optionwidgets_buttons
                [#default_value] => Array
                    (
                        [0] => Array
                            (
                                [value] => 
                            )
    
                    )
    
                [#required] => 1
                [#columns] => Array
                    (
                        [0] => value
                    )
    
                [#title] => Attending
                [#description] => 
                [#delta] => 0
                [#field_name] => field_attending
                [#type_name] => pca
                [#tree] => 1
                [#weight] => -1
                [#access] => 1
                [#count] => 9
            )

So, I'm not sure how to set a default value for it?  

Answer : Drupal - How to alter default organic group form values?

In the help text under the checkbox it says, "Group administrators always see checkboxes." Maybe try creating another account with simple privileges and see if they are there. You might also be able to use CSS to hide the boxes by just setting them to "display: none".
Random Solutions  
 
programming4us programming4us