views:

8

answers:

0

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:

//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?