function fb_form_process_request_selector in Drupal for Facebook 6.3
Same name and namespace in other branches
- 5.2 fb_form.module \fb_form_process_request_selector()
- 5 fb_form.module \fb_form_process_request_selector()
- 6.2 fb_form.module \fb_form_process_request_selector()
- 7.3 fb_form.module \fb_form_process_request_selector()
Build a friend selector for use in <fb:request-form>.
Use this to select friends when sending an invite or request.
File
- ./
fb_form.module, line 225 - This module defines facebook-specific form elements for use with Drupal's form API.
Code
function fb_form_process_request_selector($orig) {
global $_fb;
// replace with FBML markup
$element = array(
'#type' => 'markup',
'#value' => '<fb:multi-friend-selector ',
);
if (!$orig['#attributes']) {
$orig['#attributes'] = array();
}
// Use title for actiontext
if (!$orig['#attributes']['actiontext']) {
$orig['#attributes']['actiontext'] = $orig['#title'];
}
$element['#value'] .= drupal_attributes($orig['#attributes']);
// Some settings for FAPI.
foreach (array(
'#parents',
'#weight',
'#name',
'#id',
'#input',
'#required',
) as $key) {
if (isset($orig[$key])) {
$element[$key] = $orig[$key];
}
}
$element['#value'] .= ' />';
/* close tag */
return $element;
}