You are here

function fancy_login_ahah_render in Fancy Login 6.2

Rendering function for the AHAH callback function. This function is called in slideshow_framework_add_image_element().

1 call to fancy_login_ahah_render()
fancy_login_ahah in includes/fancy_login.pages.inc
Callback function for the path 'fancy_login/ahah'. This callback tells the node creation page to add an extra image upload element

File

includes/fancy_login.pages.inc, line 247

Code

function fancy_login_ahah_render() {
  module_load_include('inc', 'user', 'user.pages');
  $form_state = array(
    'storage' => NULL,
    'submitted' => FALSE,
  );
  $form_build_id = $_POST['form_build_id'];

  // Get the form from the cache.
  $form = form_get_cache($form_build_id, $form_state);
  $args = $form['#parameters'];
  $form_id = array_shift($args);

  // We need to process the form, prepare for that by setting a few internals.
  $form_state['post'] = $form['#post'] = $_POST;
  $form['#programmed'] = $form['#redirect'] = FALSE;
  $form_state['add_element'] = TRUE;

  // Build, validate and if possible, submit the form.
  drupal_process_form($form_id, $form, $form_state);

  // This call recreates the form relying solely on the form_state that the
  // drupal_process_form set up.
  $form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id);
  return $form;
}