Search by

wernerkrauss / silverstripe-contact

wernerkrauss

Simple contact module for Silverstripe CMS

Package info

github.com/wernerkrauss/silverstripe-contact

Type:silverstripe-vendormodule

pkg:composer/wernerkrauss/silverstripe-contact

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v0.1.0 2026-11-25 21:02 UTC

This package is auto-updated.

Last update: 2026-11-25 22:50:17 UTC


README

Simple contact module for Silverstripe CMS 5/6: an Elemental block with an htmx-powered contact form, submission storage in the CMS and email notification. Spam protection via silverstripe/spamprotection (e.g. honeypot) is enabled automatically when a protector is configured.

Installation

composer require wernerkrauss/silverstripe-contact

Then run dev/build?flush=1.

Usage

  1. Add the Contact block to a page in the CMS (Content → Blocks). The form submits via htmx to <page>/element/<id>/renderForm and swaps in the form partial or a success message without a full page reload.
  2. Submitted messages are stored as ContactRequest records and listed under Contact requests in the CMS (ContactAdmin).
  3. In SiteConfig → Contact form, set the sender and recipient email addresses and the success message.

Spam protection

The form calls enableSpamProtection() only if a spam protector is configured. To use the honeypot protector:

composer require innoweb/silverstripe-spamprotection-honeypot
SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
  default_spam_protector: innoweb\spamprotection\honeypot\HoneypotProtector

Requirements

  • PHP 8.1+ (8.4+ for Silverstripe 6)
  • silverstripe/framework + silverstripe/cms ^5 || ^6
  • dnadesign/silverstripe-elemental ^5 || ^6
  • silverstripe/spamprotection ^4 || ^5

License

MIT — see LICENSE.