You are here

contact-storage-disabled-form.html.twig in Contact Storage 8

The template file for a disabled contact form.

Template used to display a message when a contact form is disabled. The provided example displays a standard error message showing the message defined when creating or disabling the form, for the Bartik theme.

Available variables:

  • contact_message: The contact message entity. Some useful methods available

are :

  • contact_form.getRecipients will return the list of recipients.
  • contact_form.label will return the label of the contact form.

See \Drupal\contact\Entity\ContactForm for a full list of public properties and methods for the contact form object. Other available variables :

  • redirect_uri : The redirect URI of the contact form, an empty string if

not defined.

  • disabled_form_message : The disabled form message, configured when

creating or disabling the form. Bu default "This contact form has been disabled.".

File

templates/contact-storage-disabled-form.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * The template file for a disabled contact form.
  5. *
  6. * Template used to display a message when a contact form is disabled. The
  7. * provided example displays a standard error message showing the message
  8. * defined when creating or disabling the form, for the Bartik theme.
  9. *
  10. * Available variables:
  11. * - contact_message: The contact message entity. Some useful methods available
  12. * are :
  13. * - contact_form.getRecipients will return the list of recipients.
  14. * - contact_form.label will return the label of the contact form.
  15. * See \Drupal\contact\Entity\ContactForm for a full list of public
  16. * properties and methods for the contact form object. Other available
  17. * variables :
  18. * - redirect_uri : The redirect URI of the contact form, an empty string if
  19. * not defined.
  20. * - disabled_form_message : The disabled form message, configured when
  21. * creating or disabling the form. Bu default "This contact form has been
  22. * disabled.".
  23. */
  24. #}
  25. <div class="messages messages--error">
  26. {{ disabled_form_message }}
  27. </div>