function ctools_modal_form_render

Render a form into an AJAX display.

7 calls to ctools_modal_form_render()
ctools_ajax_sample_animal in ctools_ajax_sample/ctools_ajax_sample.module
A modal login callback.
ctools_context_ajax_item_add in includes/context-admin.inc
Ajax entry point to add an context
ctools_context_ajax_item_edit in includes/context-admin.inc
Ajax entry point to edit an item
ctools_modal_form_wrapper in includes/modal.inc
Wrap a form so that we can use it properly with AJAX. Essentially if the form wishes to render, it automatically does that, otherwise it returns the render array so we can see submission results.
ctools_stylizer_edit_style in includes/stylizer.inc
Add a new style of the specified type.

... See full list

File

includes/modal.inc, line 235

Code

function ctools_modal_form_render($form_state, $output) {
    if (is_array($output)) {
        $output = drupal_render($output);
    }
    $title = empty($form_state['title']) ? drupal_get_title() : $form_state['title'];
    // If there are messages for the form, render them.
    if ($messages = theme('status_messages')) {
        $output = $messages . $output;
    }
    $commands = array();
    // If the form has not yet been rendered, render it.
    $commands[] = ctools_modal_command_display($title, $output);
    return $commands;
}