You are here

function _hosting_signup_form in Hosting 5

Remote form definition

This is a mixture of the client form and node form, and in the future we will be able to configure which forms we want to be present.

This form is only indirectly access via the XMLRPC methods, and not displayed directly

5 string references to '_hosting_signup_form'
hosting_signup_form_submit in signup/hosting_signup.module
Local submit function for hosting_signup_form.
hosting_signup_form_validate in signup/hosting_signup.module
Local validate function for hosting_signup form.
hosting_signup_get_form in signup/hosting_signup.module
XMLRPC function to retrieve the form
hosting_signup_submit_form in signup/hosting_signup.module
XMLRPC method for submitting a form
hosting_signup_validate_form in signup/hosting_signup.module
XMLRPC method for validating the form

File

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

Code

function _hosting_signup_form() {
  $node = new stdClass();
  $form['site'] = hosting_site_form($node);
  unset($form['site']['client']);
  $form['site']['platform'] = array(
    '#type' => 'hidden',
    '#value' => HOSTING_DEFAULT_PLATFORM,
  );
  foreach (module_implements('form_alter') as $module) {
    $function = $module . '_form_alter';
    $function('site_node_form', $form['site']);
  }
  unset($form['site']['info']['client']);
  $form['client'] = hosting_client_form($node);
  foreach (module_implements('form_alter') as $module) {
    $function = $module . '_form_alter';
    $function('client_node_form', $form['client']);
  }
  $form['new_client'] = array(
    '#type' => 'value',
    '#value' => TRUE,
  );
  unset($form['client']['title']);
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t("Sign up"),
  );
  return $form;
}