Associate a content type to a specific group in drupal commons How is possible to create a content type associated by default to a group in Drupal Commons? 

I will try to explain. I have two groups: literature and art. Literature will have three content types i.e. poetry, fiction and novels. Art will have painting, photography and drawings.

I've created contents types and i've tried to associate them with the respective group by flagging the group and group content checkbox but nothing changed. I also followed the steps described here https://www.drupal.org/node/2014781 but when I try to add some content I still see the "Post to specific groups" radio option and select.

Help please!!!
I am assuming you are using one group content type, and "Literature" and "Art" are contents of that group type.

Tell me if I am wrong in my assumption.

You can use hook_form_BASE_FORM_ID_alter() to set a default field value for group field based current content type.

    function mymodule_form_node_form_alter(&amp;$form, &amp;$form_state) {
      $node = $form_state['node'];
      if (!isset($node-&gt;nid) || isset($node-&gt;is_new)) {
       global $user;
       $groups = og_get_groups_by_user($user);
          if(is_array($groups)) {
          // This needs to be evaluated to check proper mapping of what field expect to set a default default field value
          if($node['#bundle'] == "poetry" || $node['#bundle'] == "fiction" ||$node['#bundle'] == "novels") {
          $form['group_field_name']['#default'] = $groups[0];  //Whatever index Literature has 
          }
          elseif($node['#bundle'] == "painting" || $node['#bundle'] == "photography" ||$node['#bundle'] == "drawings") {
          $form['group_field_name']['#default'] = $groups[1];  // Art's index
          }
          }
      }
    }