liberusoftware / module-cms-forms
Forms module for Liberu CMS: public form definitions and spam-protected submissions that emit a FormSubmitted event.
Package info
github.com/liberusoftware/module-cms-forms
Type:liberu-module
pkg:composer/liberusoftware/module-cms-forms
Requires
- php: ^8.5
- filament/filament: ^5.11.0
- illuminate/contracts: ^13.38.0
- illuminate/database: ^13.38.0
- illuminate/http: ^13.38.0
- illuminate/routing: ^13.38.0
- illuminate/support: ^13.38.0
- liberusoftware/module-cms-content: ^0.1
- liberusoftware/module-cms-contracts: ^0.1
- liberusoftware/module-cms-core: ^0.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-14 19:55:21 UTC
README
Repository
Source, issues, and release history: https://github.com/liberusoftware/module-cms-forms
Composer package: https://packagist.org/packages/liberusoftware/module-cms-forms
Public form definitions and spam-protected submissions. Each accepted submission
is stored and announced on the event bus as FormSubmitted, so a notification
or automation module can react without this module knowing about it.
Submitting
POST /forms/{slug}
- Public (no authentication) — a visitor's browser posts directly. Rate-limited
per IP (
config('cms-forms.rate_limit')). - The payload is validated against the form's field schema; a required field
missing or a value failing its type rule returns
422. - A filled honeypot field (
config('cms-forms.honeypot'), default_hp) marks the request as a bot: it is accepted with201but not stored. - On success the submission is stored, stamped with the form's tenant, and a
Liberu\Cms\Contracts\Events\Form\FormSubmittedevent is dispatched.
Defining a form
Manage forms in the admin panel (Filament) under CMS → Forms, where the field schema is edited as a repeatable list and submissions are viewed under CMS → Form submissions. Forms can also be created programmatically:
Form::create([ 'name' => 'Contact', 'fields' => [ ['name' => 'email', 'label' => 'Email', 'type' => 'email', 'required' => true], ['name' => 'message', 'label' => 'Message', 'type' => 'textarea', 'required' => true], ], ]);
Field type is one of: text, email, textarea, number, checkbox.
Reacting to submissions
$events->listen(FormSubmitted::class, function (FormSubmitted $event): void { // notify, forward to a CRM, ... });
Config
Publish with php artisan vendor:publish --tag=cms-forms-config: honeypot,
rate_limit, success_message.