You are here

function feedback_form_submit in Feedback 7.2

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

Form submission handler for feedback_form().

File

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

Code

function feedback_form_submit($form, &$form_state) {
  $entry = new stdClass();
  entity_form_submit_build_entity('feedback', $entry, $form, $form_state);
  $entry->message = $form_state['values']['message'];
  $entry->location = $form_state['values']['location'];
  feedback_save($entry);
  $submission_message = variable_get('feedback_submitted', 'Thanks for your feedback!');
  drupal_set_message($submission_message);
}