You are here

function feedback_form_submit in Feedback 6.2

Same name and namespace in other branches
  1. 5.2 feedback.module \feedback_form_submit()
  2. 7.2 feedback.module \feedback_form_submit()

File

./feedback.module, line 143
Allows site visitors and users to report issues about this site.

Code

function feedback_form_submit($form, &$form_state) {
  feedback_add_entry($form_state['values']['message'], $form_state['values']['location']);
  $message = t('Thanks for your feedback!');
  if ($form_state['values']['ajax']) {
    echo drupal_to_js(array(
      'message' => $message,
    ));
    exit;
  }
  else {
    drupal_set_message($message);
  }
}