Add option to disable form submissions for contact forms

Created on 17 June 2016, almost 9 years ago
Updated 17 May 2025, 2 days ago

Problem/Motivation

Sometimes you want to temporarily prevent contact form submissions
At present you can only do that by deleting it, which is painful

Proposed resolution

Add ability to disable a form by adding a 'status' flag to contact form entity
Add a disabled message to allow custom message when disabled
Add schema changes
Add update hook to set default value to true
Add enable and disable forms for the entity
Add these to the entity annotation
Add routing
Add entity operation to do so
Change view builder for contact form ( #2750633: Add view builder for contact module's ContactForm entity ) to render disabled message if disabled
Change add form for message entity to render disabled message if disabled
Test coverage

Remaining tasks

All of the above
Much of this can be borrowed from functionality in contact storage - see #2724499: Allow disabling forms to prevent new submissions

User interface changes

New 'disabled message' field on contact form
New disable/enable forms
New entity operations for disable/enable

API changes

None

Data model changes

New properties

Feature request
Status

Postponed

Version

11.0 🔥

Component

contact.module

Created by

🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024