You are here

function ctools_ajax_form_after_build in Chaos Tool Suite (ctools) 6

#after_build callback: Mark the $form['#action'] as a trusted URL for Ajax.

1 string reference to 'ctools_ajax_form_after_build'
ctools_form_alter in ./ctools.module
Implements hook_form_alter().

File

./ctools.module, line 458
CTools primary module file.

Code

function ctools_ajax_form_after_build($form, $form_state) {
  $settings = array(
    'CToolsUrlIsAjaxTrusted' => array(
      $form['#action'] => TRUE,
    ),
  );
  drupal_add_js($settings, 'setting');
  return $form;
}