function privatemsg_new_preview in Privatemsg 6.2
Same name and namespace in other branches
- 7.2 privatemsg.pages.inc \privatemsg_new_preview()
- 7 privatemsg.pages.inc \privatemsg_new_preview()
1 string reference to 'privatemsg_new_preview'
- _privatemsg_form_base_fields in ./
privatemsg.pages.inc - Returns the common fields of the reply and new form.
File
- ./
privatemsg.pages.inc, line 583 - User menu callbacks for Privatemsg.
Code
function privatemsg_new_preview($form, &$form_state) {
drupal_validate_form($form['form_id']['#value'], $form, $form_state);
if (!form_get_errors()) {
$form_state['validate_built_message']['classes'] = array(
'privatemsg-message',
'privatemsg-message-preview',
);
$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.
}