MessageForm::preview

public MessageForm::preview(array $form, FormStateInterface $form_state)

Form submission handler for the 'preview' action.

File

core/modules/contact/src/MessageForm.php, line 174

Class

MessageForm
Form controller for contact message forms.

Namespace

Drupal\contact

Code

public function preview(array $form, FormStateInterface $form_state) {
  $message = $this->entity;
  $message->preview = TRUE;
  $form_state->setRebuild();
}
doc_Drupal
2016-10-29 09:28:13
Comments
Leave a Comment

Please login to continue.