Hi everyone,
I’m currently working on a project using SilverStripe 5, and I need to implement a custom contact form with proper validation and email functionality.
My requirements are:
-
Custom form fields (Name, Email, Phone, Message)
-
Server-side validation
-
Spam protection (preferably honeypot or reCAPTCHA)
-
Sending confirmation email to user
-
Sending notification email to admin
-
Clean template integration
I understand that SilverStripe provides Form, FormAction, and validation classes, but I’d like to follow best practices for SilverStripe 5 specifically.
Here are a few questions:
-
What is the recommended way to structure a custom form in SS5 — inside a PageController or as a separate Form class?
-
What’s the best method for spam protection in SilverStripe 5?
-
Is there a preferred approach for handling email templates?
-
Any recommended modules for better form handling?
If anyone has a clean example or best practice workflow, I’d really appreciate it.
Thanks in advance!