function form_test_storage_legacy_handler

Emulate legacy AHAH-style ajax callback.

Drupal 6 AHAH callbacks used to operate directly on forms retrieved using form_get_cache and stored using form_set_cache after manipulation. This callback helps testing whether form_set_cache prevents resaving of immutable forms.

1 string reference to 'form_test_storage_legacy_handler'
form_test_menu in modules/simpletest/tests/form_test.module
Implements hook_menu().

File

modules/simpletest/tests/form_test.module, line 820

Code

function form_test_storage_legacy_handler($form_build_id) {
    $form_state = array();
    $form = form_get_cache($form_build_id, $form_state);
    drupal_json_output(array(
        'form' => $form,
        'form_state' => $form_state,
    ));
    $form['#poisoned'] = TRUE;
    $form_state['poisoned'] = TRUE;
    form_set_cache($form_build_id, $form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.