You are here

function views_ajax_command_set_form in Views (for Drupal 7) 8.3

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

Creates a Drupal AJAX 'viewsSetForm' command.

Parameters

$output: The form to display in the modal.

$title: The title.

$url: An optional URL.

Return value

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. This makes some assumptions about the client.

File

includes/ajax.inc, line 97
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;
}