function hosting_signup_form_submit in Hosting 5
Same name and namespace in other branches
- 6.2 signup/hosting_signup.module \hosting_signup_form_submit()
- 7.4 signup/hosting_signup.module \hosting_signup_form_submit()
- 7.3 signup/hosting_signup.module \hosting_signup_form_submit()
Local submit function for hosting_signup_form.
Passes through the values to the remote for submission through the xmlrpc method.
Redirects to the thank you page on success.
File
- signup/
hosting_signup.module, line 244 - Provides a signup form that can be run on remote sites
Code
function hosting_signup_form_submit($form_id, $values) {
$key = variable_get('hosting_signup_server_key', '');
$values['form_id'] = '_hosting_signup_form';
$return = xmlrpc(_hosting_signup_get_url(), 'hosting_signup.submitForm', $key, $values);
if (isset($return['site']['nid']) && isset($return['site']['nid'])) {
$path = sprintf("hosting/signup/thanks/%s/%s/%s", $return['site']['title'], $return['client']['email'], $return['client']['client_name']);
drupal_goto($path);
}
}