You are here

function pm_preview in Privatemsg 6

1 string reference to 'pm_preview'
privatemsg_new in ./privatemsg.module

File

./privatemsg.module, line 1113
Allows users to send private messages to other users.

Code

function pm_preview($form, &$form_state) {
  drupal_validate_form($form['form_id']['#value'], $form, $form_state);
  if (!form_get_errors()) {
    $form_state['privatemsg_preview'] = theme('privatemsg_view', $form_state['validate_built_message']);
  }
  $form_state['rebuild'] = TRUE;

  // this forces our form to be rebuilt instead of being submitted.
}