You are here

function feedback_form_submit in Feedback 5.2

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

File

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

Code

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