function forena_ahah_helper_start in Forena Reports 6.2
Helper function to process java callbacks.
3 calls to forena_ahah_helper_start()
- forena_parameters_js in ./
forena.common.inc - Ajax callback for settings pages. Enter description here ...
- forena_settings_js in ./
forena.admin.inc - Ajax callback for settings pages. Enter description here ...
- forena_template_info_js in ./
forena.admin.inc - Ajax callback for settings pages. Enter description here ...
File
- ./
forena.common.inc, line 447 - Common functions used throughout the project but loaded in this file to keep the module file lean.
Code
function forena_ahah_helper_start() {
// The form is generated in an include file which we need to include manually.
// We're starting in step #3, preparing for #4.
$form_state = array(
'storage' => NULL,
'rebuild' => TRUE,
);
$form_build_id = $_POST['form_build_id'];
// Step #4.
$form = form_get_cache($form_build_id, $form_state);
// Preparing for #5.
$args = $form['#parameters'];
$form_id = array_shift($args);
$form_state['post'] = $form['#post'] = $_POST;
$form['#programmed'] = $form['#redirect'] = FALSE;
// Step #5.
$form_state['reuild'] = TRUE;
drupal_process_form($form_id, $form, $form_state);
// Step #6 and #7 and #8.
$form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id);
return $form;
}