You are here

function search_api_elasticsearch_attach_ajax_callback in Search API Elasticsearch 7

Same name and namespace in other branches
  1. 7.2 search_api_elasticsearch.module \search_api_elasticsearch_attach_ajax_callback()

Attach the Ajax attributes.

Parameters

array $form:

1 call to search_api_elasticsearch_attach_ajax_callback()
search_api_elasticsearch_elastica_form_alter in modules/elastica/search_api_elasticsearch_elastica.module
Implements hook_form_alter().

File

./search_api_elasticsearch.module, line 80
Provides an elasticsearch-based service class for the Search API.

Code

function search_api_elasticsearch_attach_ajax_callback(&$form) {
  $form['options']['#prefix'] = '<div id="elasticsearch-add-index">';
  $form['options']['#suffix'] = '</div>';
  $form['server']['#ajax'] = array(
    'callback' => 'search_api_elasticsearch_ajax_callback',
    'wrapper' => 'elasticsearch-add-index',
    'method' => 'replace',
    'effect' => 'fade',
  );
}