Documentation
#Configuration
Configure FilaForms plugin options.
#Overriding Models
FilaForms allows you to replace the default models with your own implementations.
use FilaForms\Core\FilaForms;
// In your AppServiceProvider boot method
FilaForms::useFormModel(App\Models\Form::class);
FilaForms::useSubmissionModel(App\Models\FormSubmission::class);
FilaForms::useEventModel(App\Models\FormEvent::class);
This is useful when you need to add custom global scopes, relationships, or modify default behavior.
#Optional Configuration
After installation, you can optionally publish configuration files to customize FilaForms behavior.
#Publish Configuration File
To customize plugin settings:
php artisan vendor:publish --tag="filaforms-config"
This creates config/filaforms.php where you can modify default settings.
#Publish Views
To customize form templates and admin views:
php artisan vendor:publish --tag="filaforms-views"
#Publish Language Files
To customize or add translations:
php artisan vendor:publish --tag="filaforms-translations"
#Configuration File Structure
The configuration file config/filaforms.php contains the following sections:
#Features Configuration
FilaForms uses an enum-based feature system to enable/disable functionality:
'features' => FeatureConfigurator::configure()
->enable(
FilaFormsFeature::NOTIFICATIONS_EMAIL_ADMIN,
FilaFormsFeature::NOTIFICATIONS_EMAIL_AUTO_RESPONSE,
FilaFormsFeature::NOTIFICATIONS_IN_APP,
FilaFormsFeature::FIELD_UI_WIDTH_CONTROL,
)
->disable(
FilaFormsFeature::MULTI_TENANCY,
),
Available features:
NOTIFICATIONS_EMAIL_ADMIN- Send email notifications to administratorsNOTIFICATIONS_EMAIL_AUTO_RESPONSE- Send auto-response emails to submittersNOTIFICATIONS_IN_APP- Show in-app notificationsFIELD_UI_WIDTH_CONTROL- Control field widths in formsMULTI_TENANCY- Enable multi-tenant support
#Database Configuration
Customize table names:
'database' => [
'table_names' => [
'forms' => 'forms',
'form_submissions' => 'form_submissions',
'form_events' => 'form_events',
],
'column_names' => [
'tenant_foreign_key' => 'tenant_id',
],
],
#Routes Configuration
Configure public form routes:
'routes' => [
'enabled' => true,
'prefix' => 'filaforms',
'middleware' => ['web'],
'domain' => null,
],
#Security Settings
Configure honeypot protection against spam:
'security' => [
'honeypot' => [
'enabled' => true,
'field_name' => 'website',
],
],
#Storage Configuration
Set file upload storage:
'storage' => [
'disk' => env('FILA_FORMS_STORAGE_DISK', 'local'),
'path' => 'form-submissions',
],
#Notifications Configuration
Configure email notifications:
'notifications' => [
'admin_emails' => [
// Add admin email addresses
],
'from_email' => env('FILA_FORMS_FROM_EMAIL'),
'from_name' => env('FILA_FORMS_FROM_NAME'),
],
#Plugin Configuration
Register the plugin in your Filament panel:
use FilaForms\Core\FilaFormsPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FilaFormsPlugin::make(),
]);
}
#Custom Field Types
Register additional field types specific to your application:
use FilaForms\Core\FilaFormsPlugin;
FilaFormsPlugin::make()
->registerFieldTypes([
'custom-rating' => CustomRatingField::class,
'signature' => SignatureField::class,
])
You can also use a closure for dynamic registration:
use FilaForms\Core\FilaFormsPlugin;
FilaFormsPlugin::make()
->registerFieldTypes(function () {
return [
'dynamic-field' => resolve(DynamicFieldType::class),
];
})
#Restrict Available Field Types
Limit which Custom Fields types are available in form builder:
use FilaForms\Core\FilaFormsPlugin;
FilaFormsPlugin::make()
->onlyFieldTypes([
'text',
'textarea',
'select',
'email',
'file',
])
#Field Types Configuration
Limit which field types are available in the form builder:
'field_types' => [
'enabled' => [
// Empty array = all field types enabled (default)
// Or specify: 'text', 'textarea', 'select', etc.
],
'disabled' => [
// List field types to disable
// Example: 'rich_editor', 'markdown_editor'
],
],
#Environment Variables
FilaForms uses these environment variables:
# Storage configuration
FILA_FORMS_STORAGE_DISK=local
# Email notifications
FILA_FORMS_FROM_EMAIL=noreply@example.com
FILA_FORMS_FROM_NAME="Your App Name"
#Database Configuration
FilaForms uses standard Laravel database configuration. Ensure your database supports JSON columns for optimal field data storage.
#Multi-Tenant Support
Multi-tenancy is controlled via the features configuration:
'features' => FeatureConfigurator::configure()
->enable(FilaFormsFeature::MULTI_TENANCY)
When enabled, forms are automatically scoped to the current tenant using the configured tenant foreign key.
#Storage Configuration
File uploads use the disk specified in the configuration:
'storage' => [
'disk' => env('FILA_FORMS_STORAGE_DISK', 'local'),
'path' => 'form-submissions',
],
You can use any disk configured in your config/filesystems.php.
#Security Settings
FilaForms includes built-in security features:
- CSRF protection on all form submissions
- Honeypot field for spam prevention (configurable)
- XSS protection on user input
- SQL injection prevention via Eloquent ORM
- Field-level encryption for sensitive data (toggle per text field)
#Notification Configuration
Notifications are configured in two places:
- Global configuration in
config/filaforms.php:
'notifications' => [
'admin_emails' => ['admin@example.com'],
'from_email' => env('FILA_FORMS_FROM_EMAIL'),
'from_name' => env('FILA_FORMS_FROM_NAME'),
],
- Per-form configuration through the form builder UI