nowo-tech / contact-form-bundle
Symfony bundle for configurable multilingual contact forms with GDPR compliance, customizable fields, client association, and admin CRUD.
Package info
github.com/nowo-tech/ContactFormBundle
Type:symfony-bundle
pkg:composer/nowo-tech/contact-form-bundle
Fund package maintenance!
Requires
- php: >=8.2 <8.6
- doctrine/doctrine-bundle: ^2.13 || ^3.0
- doctrine/orm: ^2.17 || ^3.0
- symfony/config: ^7.4 || ^8.0
- symfony/console: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/event-dispatcher: ^7.4 || ^8.0
- symfony/form: ^7.4 || ^8.0
- symfony/framework-bundle: ^7.4 || ^8.0
- symfony/http-foundation: ^7.4 || ^8.0
- symfony/http-kernel: ^7.4 || ^8.0
- symfony/routing: ^7.4 || ^8.0
- symfony/translation: ^7.4 || ^8.0
- symfony/twig-bundle: ^7.4 || ^8.0
- symfony/validator: ^7.4 || ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.0
- rector/rector: ^2.0
- symfony/browser-kit: ^7.4 || ^8.0
- symfony/dom-crawler: ^7.4 || ^8.0
- symfony/mailer: ^7.4 || ^8.0
- symfony/security-bundle: ^7.4 || ^8.0
- symfony/security-core: ^7.4
- symfony/security-csrf: ^7.4 || ^8.0
- symfony/var-exporter: ^7.4 || ^8.0
- symfony/yaml: ^7.4 || ^8.0
Suggests
- nowo-tech/phone-input-bundle: Rich phone fields with country flags and search in the prefix selector
- symfony/form: ^8.1 required for the admin field wizard (FormFlow)
- symfony/mailer: Send submission notifications via email
- symfony/security-bundle: Link submissions to authenticated clients automatically
- symfony/security-csrf: Enable CSRF protection on public contact forms
This package is auto-updated.
Last update: 2026-07-13 07:00:32 UTC
README
⭐ Found this useful? Install from Packagist · Give it a star on GitHub so more developers can find it.
Contact Form Bundle — configurable multilingual contact forms with GDPR consent, customizable fields (email, phone, text, textarea, select), optional client association, anonymous submissions, and admin CRUD. For Symfony 7.4+ and 8 · PHP 8.2+.
Features
- ✅ Admin CRUD for form definitions, customizable fields, and submissions
- ✅ Multilingual copy via translation entities (title, labels, GDPR text, success message)
- ✅ Customizable fields: text, email, phone, textarea, select (options per field)
- ✅ GDPR: required consent checkbox, privacy policy link, IP anonymization, retention days
- ✅ Client association: optional link to an existing host client entity or anonymous submissions
- ✅ Public form at
/contact/{slug}with PRG flow and flash success message - ✅ Override Twig templates and translations from your application
- ✅ Pluggable notifications (custom notifier, Symfony Mailer, or
ContactSubmissionCreatedEvent) - ✅ GDPR retention cleanup via
nowo:contact-form:cleanup-submissions
Installation
composer require nowo-tech/contact-form-bundle
Register in config/bundles.php if Flex recipe is not applied:
Nowo\ContactFormBundle\NowoContactFormBundle::class => ['all' => true],
Import routes in config/routes.yaml:
nowo_contact_form: resource: '@NowoContactFormBundle/Resources/config/routes.yaml'
Run Doctrine migrations after mapping entities (bundle registers ORM mappings automatically).
Documentation
- Installation
- Configuration
- Usage
- Contributing
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
- Demo FrankenPHP (when using FrankenPHP demos)
Requirements
- PHP 8.2+
- Symfony 7.4+ or 8.0+
- Doctrine ORM 2.17+ or 3.x
Demo
make -C demo/symfony8 up
Default URL: http://localhost:8021 (see demo .env.example for PORT).
FrankenPHP worker mode: demos ship with worker-enabled Caddyfile for production-style runs; development uses Caddyfile.dev without workers. See docs/DEMO-FRANKENPHP.md.
Development
make up
make test
make qa
make release-check
Tests and coverage
| Language | Coverage |
|---|---|
| PHP | 99.78% line coverage (run make test-coverage to refresh) |
| TS/JS | N/A |
| Python | N/A |
License & author
MIT · Nowo.tech · Héctor Franco Aceituno