You are here

function _ajax_comments_preview_js in AJAX Comments 8

Ajax form callback: Preview comment.

1 string reference to '_ajax_comments_preview_js'
ajax_comments_form_comment_form_alter in ./ajax_comments.module
Implements hook_form_FORM_ID_alter().

File

./ajax_comments.module, line 279
AJAX comments module file.

Code

function _ajax_comments_preview_js($form, FormStateInterface $form_state) {
  $message = 'Comment preview';
  $response = new AjaxResponse();
  $response
    ->addCommand(new AlertCommand($message));
  return $response;
}