function oa_core_add_member_form in Open Atrium Core 7.2
Render the form for Add Member
Parameters
$form: The FAPI array
$form_state: The state of the form
$space: The space being viewed
Return value
The form
1 string reference to 'oa_core_add_member_form'
- oa_core_add_member_render in plugins/
content_types/ oa_core_add_member.inc - Render callback for the content visibility panel.
File
- plugins/
content_types/ oa_core_add_member.inc, line 48
Code
function oa_core_add_member_form($form, &$form_state, $space) {
// Since this form functions via AJAX we need to tell the form handlers to include it when processing the form
ctools_form_include_file($form_state, drupal_get_path('module', 'oa_core') . '/plugins/content_types/oa_core_add_member.inc');
$form['#space'] = $space;
$name = node_type_get_name($space->type);
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('User name'),
'#autocomplete_path' => 'user/autocomplete',
'#prefix' => '<div id="og-core-member-replace-me">',
'#suffix' => '</div>',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Add to @name', array(
'@name' => drupal_strtolower(node_type_get_name($space->type)),
)),
);
if (variable_get('oa_use_ajax', FALSE)) {
$form['submit']['#ajax'] = array(
'callback' => 'oa_core_add_member_ajax',
'wrapper' => 'og-core-member-replace-me',
);
}
return $form;
}