ajax_example_advanced_commands_after_callback

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 ajax_example_advanced_commands_after_callback($form, $form_state)

'after' callback.

See also

ajax_command_after()

Code

examples/ajax_example/ajax_example_advanced.inc, line 233

<?php
function ajax_example_advanced_commands_after_callback($form, $form_state) {
  $selector = '#after_div';

  $commands = array();
  $commands[] = ajax_command_after($selector, "New 'after'...");
  $commands[] = ajax_command_replace("#after_status", "<div id='after_status'>Updated after_command_example " . date('r') . "</div>");
  return array('#type' => 'ajax', '#commands' => $commands);
}
?>