You are here

function hosting_signup_form_validate in Hosting 5

Same name and namespace in other branches
  1. 6.2 signup/hosting_signup.module \hosting_signup_form_validate()
  2. 7.4 signup/hosting_signup.module \hosting_signup_form_validate()
  3. 7.3 signup/hosting_signup.module \hosting_signup_form_validate()

Local validate function for hosting_signup form.

Passes through the values to the remote validation function through the xmlrpc method.

Sets any errors that are returned from the remote site on the local site.

File

signup/hosting_signup.module, line 206
Provides a signup form that can be run on remote sites

Code

function hosting_signup_form_validate($form_id, $values) {
  $key = variable_get('hosting_signup_server_key', '');
  $values['form_id'] = '_hosting_signup_form';
  $return = xmlrpc(_hosting_signup_get_url(), 'hosting_signup.validateForm', $key, $values);
  if (is_array($return) && sizeof($return)) {
    foreach ($return as $field => $message) {
      form_set_error($field, $message);
    }
  }
}