function signup_form in Signup 5
Same name and namespace in other branches
- 5.2 signup.module \signup_form()
- 6.2 includes/signup_form.inc \signup_form()
- 6 includes/signup_form.inc \signup_form()
- 7 includes/signup_form.inc \signup_form()
Builder function for the signup form
1 string reference to 'signup_form'
- signup_nodeapi in ./
signup.module - hook_nodeapi implementation
File
- ./
signup.module, line 667
Code
function signup_form($node, $anon_signup_form = array()) {
global $user;
$form['nid'] = array(
'#type' => 'value',
'#value' => $node->nid,
);
$form['uid'] = array(
'#type' => 'value',
'#value' => $user->uid,
);
$form['collapse'] = array(
'#type' => 'fieldset',
'#title' => t('Sign up for @title', array(
'@title' => $node->title,
)),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
// Build the themed signup form. If the anon signup form is
// present, merge it in at the end of the form.
$signup_themed_form = theme('signup_user_form');
if (!empty($anon_signup_form)) {
$signup_themed_form = array_merge($signup_themed_form, $anon_signup_form);
}
$form['collapse']['signup_user_form'] = $signup_themed_form;
$form['collapse']['submit'] = array(
'#type' => 'submit',
'#value' => t('Sign up'),
);
return $form;
}