form_cache

Categories

Component ID

2723461

Component name

form_cache

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Tyny form cache handler module to turn off form submission while it is rendering to put then to i.e. an AJAX popup window.

Using: just call

form_cache_disable_cache_input($form_build_id);

        // It will prepare new form and put it into cache then.
        $build = entity_view($entity_type, $entities, $view_mode);
        $content = render($build);

        // Restore switcher position to enable form input processing.
        form_cache_enable_cache_input();

and add it to a form element by i.e. 'hook_form_BASE_FORM_ID_alter()'

    $form['#process'][] = 'form_cache_process_input_switch';