function multiple_registration_create_registration_form in Multiple Registration 7
Form for creating new registration page.
1 string reference to 'multiple_registration_create_registration_form'
- multiple_registration_menu in ./
multiple_registration.module - Implements hook_menu().
File
- ./
multiple_registration.module, line 223 - Add ability to create several registration pages.
Code
function multiple_registration_create_registration_form($form, &$form_state, $rid) {
if (!isset($rid) || !is_numeric($rid)) {
return FALSE;
}
$roles = user_roles();
if (!isset($roles[$rid])) {
return FALSE;
}
$form['rid'] = array(
'#type' => 'value',
'#value' => $rid,
);
$form['multiple_registration_path_' . $rid] = array(
'#type' => 'textfield',
'#title' => t('@role Registration page path', array(
'@role' => $roles[$rid],
)),
'#description' => t('Path for registration page.'),
'#default_value' => variable_get('multiple_registration_path_' . $rid, ''),
'#required' => TRUE,
);
$form['multiple_registration_url_' . $rid] = array(
'#type' => 'value',
'#value' => MULTIPLE_REGISTRATION_SIGNUP_PATH_PATTERN . $rid,
);
$form['#submit'][] = 'multiple_registration_create_registration_form_submit';
return system_settings_form($form);
}