I would like to submit a feature request. I added the following to og_username_helper.module and was able to use a real name search in more places. (We use Acuqia Commons).

The following was added to og_username_helper_form_alter

 74   if ($form['#id'] == 'og-invite-link-invite-page-form') {
 75       
 76       $form['invitees'] = array(
 77           '#type' => 'textfield',
 78           '#description' => t('Lookup a username and add it to the list below.'),
 79           '#autocomplete_path' => 'og/username_helper/autocomplete',
 80           '#size' => 40,
 81           '#maxlength' => 60,
 82           '#weight' => -2,
 83           '#access' => $helper_access,
 84           );
 85           
 86       return $form;
 87     } 


Perhaps we could consider building a admin section in which site administrators could add this wonderful Realnames lookup field to other areas by naming form and field IDs?

(Wonderful module. This solved my problem today!)

Detailed
http://drupal.stackexchange.com/questions/30405/using-realnames-in-other...

Comments

rgchi’s picture

Status: Active » Patch (to be ported)
Issue tags: +realname, +Drupal Commons

Infact I set up another module to include the following below. So now, I'm able to build a "lookup table" via an array structure and just add another line like 64 and 65 for each new field that I want to override.

Specifically, this adds the realname lookup to Commons's Group Invite (og/users/xx/invite/) and the Find New Friends block (appearing on /user/xx/about/).

 58 /**
 59  * Extends og_username_helper to Groups Invite Members tab
 60  */
 61 function soc_searchtweak_form_alter(&$form, $form_state, $form_id) {
 62 
 63   $form_changes = array();
 64   $form_changes['og-invite-link-invite-page-form']='invitees';
 65   $form_changes['commons-profile-friend-search-form']='search_text';
 66 
 67 
 68   foreach ($form_changes as $form_id=>$field_id) {
 69 
 70 
 71     if ($form['#id'] == $form_id) {
 72       $form[$field_id] = array(
 73           '#type' => 'textfield',
 74           '#description' => t('Lookup a username and add it to the list below.'),
 75           '#autocomplete_path' => 'og/username_helper/autocomplete',
 76           '#size' => 40,
 77           '#maxlength' => 60,
 78           '#weight' => -2,
 79           '#access' => $helper_access,
 80           );
 81 
 82       return $form;
 83     }
 84 
 85   }
 86 
 87 
 88 }