Skip to content

Conversation

@scottgrayson
Copy link
Contributor

Overview

This PR adds optional email notification functionality for form submissions.

Features

  • Admins/Training Admins can configure email recipients for form notifications
  • Notifications are queued for background processing
  • Configurable user select dropdown (or manual email entry)
  • Professional email template with form details and submission link
  • App name included in subject line

Changes

  • Added notification_emails JSON column to filament_forms table
  • Created FormSubmissionNotification mailable
  • Added FilamentFormUserObserver to automatically send notifications
  • Updated FilamentFormResource with user select field
  • Added user_model configuration option
  • Created email template view

Configuration

Defaults to using App\Models\User for the user select dropdown. Can be customized in config/filament-form-builder.php.

scott grayson and others added 11 commits November 25, 2025 15:24
- Add notification_emails JSON column to filament_forms table
- Add FormSubmissionNotification mailable with queued delivery
- Add FilamentFormUserObserver to automatically send notifications
- Add user select field to form builder for configuring recipients
- Add user_model configuration option (defaults to App\Models\User)
- Include app name in notification subject line
- Add professional email template for notifications
… entry

- Change button URL to form resource edit page
- Update button text to 'View Form & Entries'
- Admins prefer to export entries from the form page
- Refactor observer to use shared sendNotifications() method
- Add updated() method to fire notifications on form resubmissions
- Both created() and updated() events now send notification emails
- Add all form field questions and answers to email body
- Format submitted by and at on separate lines
- Makes email useful for non-users who can't log in to view entries
- Log when updated() event fires
- Log notification email configuration status
- Log email sending actions
- Helps troubleshoot why resubmissions may not trigger emails
Keep email simple with just form name, submitter, and timestamp
- Remove unnecessary nullsafe operator
- Remove unnecessary ternary operator
- Remove unnecessary null coalescing operator
- Simplify notification email handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants