You are here

function views_ajax_command_set_form in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 8.3 includes/ajax.inc \views_ajax_command_set_form()

Creates a Drupal AJAX 'viewsSetForm' command.

Parameters

string $output: The form to display in the modal.

string $title: The title.

string $url: An optional URL.

Return value

array An array suitable for use with the ajax_render() function.

Related topics

2 calls to views_ajax_command_set_form()
views_ajax_error in includes/ajax.inc
Return an AJAX error.
views_ajax_form_wrapper in includes/ajax.inc
Wrapper around drupal_build_form to handle some AJAX stuff automatically.

File

includes/ajax.inc, line 102
Handles the server side AJAX interactions of Views.

Code

function views_ajax_command_set_form($output, $title, $url = NULL) {
  $command = array(
    'command' => 'viewsSetForm',
    'output' => $output,
    'title' => $title,
  );
  if (isset($url)) {
    $command['url'] = $url;
  }
  return $command;
}