function hosting_wizard_form in Hosting 5
Form modifier similar to confirm_form
Handles some bookkeeping like adding the js and css, embedded the right classes, and most importantly : adding the wizard_form_submit to the #submit element. Without this, you would never be forwarded to the next page.
11 calls to hosting_wizard_form()
- hosting_wizard_account in ./
hosting.wizard.inc - Account form.
- hosting_wizard_complete in ./
hosting.wizard.inc - The last page.
- hosting_wizard_hosting_features in ./
hosting.wizard.inc - hosting_wizard_hosting_import in ./
hosting.wizard.inc - hosting_wizard_hosting_init in ./
hosting.wizard.inc - Form that confirms that cron is running, and that the platform has been successfuly verified
File
- ./
hosting.wizard.inc, line 536
Code
function hosting_wizard_form($step, $form, $next = null) {
drupal_add_css(drupal_get_path("module", "hosting") . '/hosting.wizard.css');
drupal_add_css(drupal_get_path("module", "hosting") . '/hosting.wizard.js');
// @todo: add a message to exit the wizard.
hosting_wizard_set_title($step);
$form['#submit']['hosting_wizard_' . str_replace('/', '_', $step) . '_submit'] = array();
$form['#submit']['hosting_wizard_form_submit'] = array();
$form['#prefix'] = '<div id="hosting-wizard-form">';
$form['#suffix'] = '</div>';
$form['step'] = array(
'#type' => 'value',
'#value' => $step,
);
$form['wizard_form'] = array(
'#prefix' => '<div id="hosting-wizard-form-buttons">',
'#suffix' => '</div>',
'#weight' => 100,
);
$info = hosting_wizard_steps(hosting_wizard_next_step());
$text = $next ? $next : ($info['heading'] ? $info['heading'] : t('Continue'));
$form['wizard_form']['submit'] = array(
'#type' => 'submit',
'#value' => $text . ' ->',
);
return $form;
}