Skip to main content
Default Flex Forms models work for single-tenant Filament apps. Multi-tenant or white-label hosts often need extra columns (team_id, organization_id), global scopes, or separate connection tables — register subclasses early in AppServiceProvider::register().

Registrar API

Each class must extend the package base model: Invalid classes throw InvalidArgumentException at registration time.

Example: tenant-scoped form

app/Models/TenantFlexForm.php
Add migrations for new columns on the same tables (flex_forms, flex_form_submissions, flex_form_integration_connections, …) — do not rename tables unless you override $table consistently.

Resolving models in your code

Use the registrar instead of hard-coded class names:
Package internals (ingestor, integration manager, policies) resolve through the same API — custom models participate everywhere once registered.

Connections and deliveries

When swapping connection/delivery models:
  • Keep credentials encrypted cast for OAuth tokens — OAuth token management
  • Scope Connections per tenant the same way as forms
  • Delivery rows power admin replay UI — preserve foreign keys to submissions

Policies and authorization

Register policies on your subclass if Filament resolves $record as the custom model:
Combine with Multi-tenancy (uploads.authorize, authorizeAbilityUsing).
Call registrars before Flex Forms boots ( register(), not boot() ). Late registration leaves cached resolves pointing at default models.
Last modified on September 7, 2026