Skip to content

Spam Defense, Encryption & Drafts

Forms combines multi-layered anti-spam checks, authenticated field-level encryption at rest, quota/duplicate enforcement, and secure upload staging without forcing intrusive UX on legitimate visitors.

  1. Deterministic Honeypot ($forms->honeypotFieldName($slug)): Per-form hidden decoy field that silently flags automated bots.
  2. Signed Render Timestamps (SignedStateCodec, $forms->signTimestamp($slug)): HKDF-SHA256 signed timestamps reject instant bot submissions and expired replay forms.
  3. Lightweight JS Challenge & Atomic Nonces: Verifies client execution using forms_nonces and enforces per-IP sliding-window throttling via forms_rate_limits.
  4. Pluggable CAPTCHA (CaptchaVerifierInterface, HttpCaptchaVerifier): Automatically queues active HTTPS provider scripts via $forms->queueCaptchaScript() (with type="module" support) and accepts custom/test verifiers via $forms->setCaptchaVerifier().
  5. Optional AI Spam Classification (Forms::evaluateAiSpam): When Ai is installed, evaluates borderline submissions semantically before accepting them.

Field-Level Encryption at Rest (FieldValueCipher)

Section titled “Field-Level Encryption at Rest (FieldValueCipher)”

Toggle Encrypt at Rest on any sensitive field in the Visual Builder (such as passport numbers or medical notes). FieldValueCipher seals values with authenticated encryption (enc:forms:v1:...) before persistence and decrypts them only for authorized viewers.

FormSecretMasker also redacts password values to •••••••• across webhooks, notifications, and headless responses, while SubmissionExporter omits password columns entirely.

Quotas, Duplicate Guards & UTM Capture (QuotaAndDuplicateGuard)

Section titled “Quotas, Duplicate Guards & UTM Capture (QuotaAndDuplicateGuard)”
  • Availability & Quotas ($forms->checkFormAvailability($slug, $ip)): Enforces open/close schedule windows, total submission caps, and per-IP quotas.
  • Duplicate Policies ($forms->hasSubmitted($slug, $values, $context)): Prevents duplicate entries by user, email, cookie, or ip_or_cookie, optionally scoped by duplicate_scope_field (for example one inquiry per yacht per email).
  • UTM Capture: Automatically records configured query parameters (utm_source, utm_medium, utm_campaign, utm_term, utm_content, ref) alongside each submission.

Encrypted Server-Side Drafts & Self-Service Tokens (SubmissionTokenManager)

Section titled “Encrypted Server-Side Drafts & Self-Service Tokens (SubmissionTokenManager)”
  • Save & Resume Drafts (forms-drafts): Multi-step forms can save encrypted server-side drafts with token rotation and per-IP rate limiting. Restore drafts via $forms->restoreDraftToken($slug, $token) and email resume links via $forms->sendDraftResumeEmail($slug, $email, $resumeUrl).
  • Self-Service Edit & Delete: SubmissionResult exposes capability URLs (editUrl, deleteUrl, deleteToken) so visitors can update or delete their own submission via /_forms/submission/delete/* or $forms->deleteSubmissionByToken($rawToken, $slug).
  • Staged Uploads (StagedUploadStore & UploadedFileValidator): Multi-step file uploads are staged inside canonical realpath()-verified directories with strict MIME, double-extension, size, and FileValidatorModule verification before final attachment.

Next steps